@lovelybunch/api 1.0.69-alpha.18 → 1.0.69-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/routes/api/v1/events/purge/route.d.ts +0 -2
- package/dist/routes/api/v1/events/purge/route.js +2 -14
- package/dist/routes/api/v1/events/route.d.ts +0 -2
- package/dist/routes/api/v1/events/route.js +2 -14
- package/dist/routes/api/v1/events/stream/route.js +2 -14
- package/package.json +4 -4
- package/static/assets/{index-B8R7MEZ5.js → index-BGfUbDUx.js} +3 -3
- package/static/index.html +1 -1
|
@@ -651,7 +651,7 @@ Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}
|
|
|
651
651
|
|
|
652
652
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
653
653
|
|
|
654
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},_z="DialogDescriptionWarning",wz=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Oj(_z).contentName}}.`;return w.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},dy=yj,Lj=Sj,hy=wj,Ld=Cj,Md=Nj,Fd=Aj,Pd=Rj,cm=Ij;const Mj=dy,Cz=hy,Fj=w.forwardRef(({className:e,...t},n)=>r.jsx(Ld,{className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Fj.displayName=Ld.displayName;const Nz=fc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),fy=w.forwardRef(({side:e="right",className:t,children:n,...s},a)=>r.jsxs(Cz,{children:[r.jsx(Fj,{}),r.jsxs(Md,{ref:a,className:Te(Nz({side:e}),t),...s,children:[n,r.jsxs(cm,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[r.jsx(Tr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));fy.displayName=Md.displayName;const py=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col space-y-2 text-center sm:text-left",e),...t});py.displayName="SheetHeader";const my=w.forwardRef(({className:e,...t},n)=>r.jsx(Fd,{ref:n,className:Te("text-lg font-semibold text-foreground",e),...t}));my.displayName=Fd.displayName;const Pj=w.forwardRef(({className:e,...t},n)=>r.jsx(Pd,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));Pj.displayName=Pd.displayName;function ek({className:e,...t}){return r.jsx("div",{className:Te("animate-pulse rounded-md bg-muted",e),...t})}const Tz=["top","right","bottom","left"],Mi=Math.min,ls=Math.max,yp=Math.round,If=Math.floor,aa=e=>({x:e,y:e}),Az={left:"right",right:"left",bottom:"top",top:"bottom"},kz={start:"end",end:"start"};function W0(e,t,n){return ls(e,Mi(t,n))}function Wa(e,t){return typeof e=="function"?e(t):e}function Va(e){return e.split("-")[0]}function gc(e){return e.split("-")[1]}function gy(e){return e==="x"?"y":"x"}function by(e){return e==="y"?"height":"width"}const Rz=new Set(["top","bottom"]);function na(e){return Rz.has(Va(e))?"y":"x"}function xy(e){return gy(na(e))}function Dz(e,t,n){n===void 0&&(n=!1);const s=gc(e),a=xy(e),o=by(a);let u=a==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(u=Ep(u)),[u,Ep(u)]}function Iz(e){const t=Ep(e);return[V0(e),t,V0(t)]}function V0(e){return e.replace(/start|end/g,t=>kz[t])}const tk=["left","right"],nk=["right","left"],jz=["top","bottom"],Oz=["bottom","top"];function Lz(e,t,n){switch(e){case"top":case"bottom":return n?t?nk:tk:t?tk:nk;case"left":case"right":return t?jz:Oz;default:return[]}}function Mz(e,t,n,s){const a=gc(e);let o=Lz(Va(e),n==="start",s);return a&&(o=o.map(u=>u+"-"+a),t&&(o=o.concat(o.map(V0)))),o}function Ep(e){return e.replace(/left|right|bottom|top/g,t=>Az[t])}function Fz(e){return{top:0,right:0,bottom:0,left:0,...e}}function Bj(e){return typeof e!="number"?Fz(e):{top:e,right:e,bottom:e,left:e}}function Sp(e){const{x:t,y:n,width:s,height:a}=e;return{width:s,height:a,top:n,left:t,right:t+s,bottom:n+a,x:t,y:n}}function rk(e,t,n){let{reference:s,floating:a}=e;const o=na(t),u=xy(t),c=by(u),d=Va(t),h=o==="y",p=s.x+s.width/2-a.width/2,m=s.y+s.height/2-a.height/2,g=s[c]/2-a[c]/2;let v;switch(d){case"top":v={x:p,y:s.y-a.height};break;case"bottom":v={x:p,y:s.y+s.height};break;case"right":v={x:s.x+s.width,y:m};break;case"left":v={x:s.x-a.width,y:m};break;default:v={x:s.x,y:s.y}}switch(gc(t)){case"start":v[u]-=g*(n&&h?-1:1);break;case"end":v[u]+=g*(n&&h?-1:1);break}return v}const Pz=async(e,t,n)=>{const{placement:s="bottom",strategy:a="absolute",middleware:o=[],platform:u}=n,c=o.filter(Boolean),d=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:m}=rk(h,s,d),g=s,v={},C=0;for(let S=0;S<c.length;S++){const{name:b,fn:y}=c[S],{x:E,y:_,data:N,reset:A}=await y({x:p,y:m,initialPlacement:s,placement:g,strategy:a,middlewareData:v,rects:h,platform:u,elements:{reference:e,floating:t}});p=E??p,m=_??m,v={...v,[b]:{...v[b],...N}},A&&C<=50&&(C++,typeof A=="object"&&(A.placement&&(g=A.placement),A.rects&&(h=A.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:a}):A.rects),{x:p,y:m}=rk(h,g,d)),S=-1)}return{x:p,y:m,placement:g,strategy:a,middlewareData:v}};async function pd(e,t){var n;t===void 0&&(t={});const{x:s,y:a,platform:o,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:g=!1,padding:v=0}=Wa(t,e),C=Bj(v),b=c[g?m==="floating"?"reference":"floating":m],y=Sp(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:d})),E=m==="floating"?{x:s,y:a,width:u.floating.width,height:u.floating.height}:u.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),N=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},A=Sp(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:_,strategy:d}):E);return{top:(y.top-A.top+C.top)/N.y,bottom:(A.bottom-y.bottom+C.bottom)/N.y,left:(y.left-A.left+C.left)/N.x,right:(A.right-y.right+C.right)/N.x}}const Bz=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:a,rects:o,platform:u,elements:c,middlewareData:d}=t,{element:h,padding:p=0}=Wa(e,t)||{};if(h==null)return{};const m=Bj(p),g={x:n,y:s},v=xy(a),C=by(v),S=await u.getDimensions(h),b=v==="y",y=b?"top":"left",E=b?"bottom":"right",_=b?"clientHeight":"clientWidth",N=o.reference[C]+o.reference[v]-g[v]-o.floating[C],A=g[v]-o.reference[v],k=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let I=k?k[_]:0;(!I||!await(u.isElement==null?void 0:u.isElement(k)))&&(I=c.floating[_]||o.floating[C]);const R=N/2-A/2,M=I/2-S[C]/2-1,L=Mi(m[y],M),$=Mi(m[E],M),H=L,B=I-S[C]-$,z=I/2-S[C]/2+R,Q=W0(H,z,B),P=!d.arrow&&gc(a)!=null&&z!==Q&&o.reference[C]/2-(z<H?L:$)-S[C]/2<0,X=P?z<H?z-H:z-B:0;return{[v]:g[v]+X,data:{[v]:Q,centerOffset:z-Q-X,...P&&{alignmentOffset:X}},reset:P}}}),Uz=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:a,middlewareData:o,rects:u,initialPlacement:c,platform:d,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:S=!0,...b}=Wa(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=Va(a),E=na(c),_=Va(c)===c,N=await(d.isRTL==null?void 0:d.isRTL(h.floating)),A=g||(_||!S?[Ep(c)]:Iz(c)),k=C!=="none";!g&&k&&A.push(...Mz(c,S,C,N));const I=[c,...A],R=await pd(t,b),M=[];let L=((s=o.flip)==null?void 0:s.overflows)||[];if(p&&M.push(R[y]),m){const z=Dz(a,u,N);M.push(R[z[0]],R[z[1]])}if(L=[...L,{placement:a,overflows:M}],!M.every(z=>z<=0)){var $,H;const z=((($=o.flip)==null?void 0:$.index)||0)+1,Q=I[z];if(Q&&(!(m==="alignment"?E!==na(Q):!1)||L.every(Y=>na(Y.placement)===E?Y.overflows[0]>0:!0)))return{data:{index:z,overflows:L},reset:{placement:Q}};let P=(H=L.filter(X=>X.overflows[0]<=0).sort((X,Y)=>X.overflows[1]-Y.overflows[1])[0])==null?void 0:H.placement;if(!P)switch(v){case"bestFit":{var B;const X=(B=L.filter(Y=>{if(k){const F=na(Y.placement);return F===E||F==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(F=>F>0).reduce((F,O)=>F+O,0)]).sort((Y,F)=>Y[1]-F[1])[0])==null?void 0:B[0];X&&(P=X);break}case"initialPlacement":P=c;break}if(a!==P)return{reset:{placement:P}}}return{}}}};function sk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ak(e){return Tz.some(t=>e[t]>=0)}const Hz=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:s="referenceHidden",...a}=Wa(e,t);switch(s){case"referenceHidden":{const o=await pd(t,{...a,elementContext:"reference"}),u=sk(o,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:ak(u)}}}case"escaped":{const o=await pd(t,{...a,altBoundary:!0}),u=sk(o,n.floating);return{data:{escapedOffsets:u,escaped:ak(u)}}}default:return{}}}}},Uj=new Set(["left","top"]);async function $z(e,t){const{placement:n,platform:s,elements:a}=e,o=await(s.isRTL==null?void 0:s.isRTL(a.floating)),u=Va(n),c=gc(n),d=na(n)==="y",h=Uj.has(u)?-1:1,p=o&&d?-1:1,m=Wa(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:C}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof C=="number"&&(v=c==="end"?C*-1:C),d?{x:v*p,y:g*h}:{x:g*h,y:v*p}}const zz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:a,y:o,placement:u,middlewareData:c}=t,d=await $z(t,e);return u===((n=c.offset)==null?void 0:n.placement)&&(s=c.arrow)!=null&&s.alignmentOffset?{}:{x:a+d.x,y:o+d.y,data:{...d,placement:u}}}}},Gz=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:a}=t,{mainAxis:o=!0,crossAxis:u=!1,limiter:c={fn:b=>{let{x:y,y:E}=b;return{x:y,y:E}}},...d}=Wa(e,t),h={x:n,y:s},p=await pd(t,d),m=na(Va(a)),g=gy(m);let v=h[g],C=h[m];if(o){const b=g==="y"?"top":"left",y=g==="y"?"bottom":"right",E=v+p[b],_=v-p[y];v=W0(E,v,_)}if(u){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",E=C+p[b],_=C-p[y];C=W0(E,C,_)}const S=c.fn({...t,[g]:v,[m]:C});return{...S,data:{x:S.x-n,y:S.y-s,enabled:{[g]:o,[m]:u}}}}}},qz=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:a,rects:o,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=Wa(e,t),p={x:n,y:s},m=na(a),g=gy(m);let v=p[g],C=p[m];const S=Wa(c,t),b=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const _=g==="y"?"height":"width",N=o.reference[g]-o.floating[_]+b.mainAxis,A=o.reference[g]+o.reference[_]-b.mainAxis;v<N?v=N:v>A&&(v=A)}if(h){var y,E;const _=g==="y"?"width":"height",N=Uj.has(Va(a)),A=o.reference[m]-o.floating[_]+(N&&((y=u.offset)==null?void 0:y[m])||0)+(N?0:b.crossAxis),k=o.reference[m]+o.reference[_]+(N?0:((E=u.offset)==null?void 0:E[m])||0)-(N?b.crossAxis:0);C<A?C=A:C>k&&(C=k)}return{[g]:v,[m]:C}}}},Wz=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:a,rects:o,platform:u,elements:c}=t,{apply:d=()=>{},...h}=Wa(e,t),p=await pd(t,h),m=Va(a),g=gc(a),v=na(a)==="y",{width:C,height:S}=o.floating;let b,y;m==="top"||m==="bottom"?(b=m,y=g===(await(u.isRTL==null?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(y=m,b=g==="end"?"top":"bottom");const E=S-p.top-p.bottom,_=C-p.left-p.right,N=Mi(S-p[b],E),A=Mi(C-p[y],_),k=!t.middlewareData.shift;let I=N,R=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=_),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(I=E),k&&!g){const L=ls(p.left,0),$=ls(p.right,0),H=ls(p.top,0),B=ls(p.bottom,0);v?R=C-2*(L!==0||$!==0?L+$:ls(p.left,p.right)):I=S-2*(H!==0||B!==0?H+B:ls(p.top,p.bottom))}await d({...t,availableWidth:R,availableHeight:I});const M=await u.getDimensions(c.floating);return C!==M.width||S!==M.height?{reset:{rects:!0}}:{}}}};function um(){return typeof window<"u"}function bc(e){return Hj(e)?(e.nodeName||"").toLowerCase():"#document"}function us(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ca(e){var t;return(t=(Hj(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hj(e){return um()?e instanceof Node||e instanceof us(e).Node:!1}function Ps(e){return um()?e instanceof Element||e instanceof us(e).Element:!1}function oa(e){return um()?e instanceof HTMLElement||e instanceof us(e).HTMLElement:!1}function ik(e){return!um()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof us(e).ShadowRoot}const Vz=new Set(["inline","contents"]);function Bd(e){const{overflow:t,overflowX:n,overflowY:s,display:a}=Bs(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!Vz.has(a)}const Yz=new Set(["table","td","th"]);function Kz(e){return Yz.has(bc(e))}const Xz=[":popover-open",":modal"];function dm(e){return Xz.some(t=>{try{return e.matches(t)}catch{return!1}})}const Zz=["transform","translate","scale","rotate","perspective"],Qz=["transform","translate","scale","rotate","perspective","filter"],Jz=["paint","layout","strict","content"];function vy(e){const t=yy(),n=Ps(e)?Bs(e):e;return Zz.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Qz.some(s=>(n.willChange||"").includes(s))||Jz.some(s=>(n.contain||"").includes(s))}function eG(e){let t=Fi(e);for(;oa(t)&&!Zl(t);){if(vy(t))return t;if(dm(t))return null;t=Fi(t)}return null}function yy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const tG=new Set(["html","body","#document"]);function Zl(e){return tG.has(bc(e))}function Bs(e){return us(e).getComputedStyle(e)}function hm(e){return Ps(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fi(e){if(bc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ik(e)&&e.host||ca(e);return ik(t)?t.host:t}function $j(e){const t=Fi(e);return Zl(t)?e.ownerDocument?e.ownerDocument.body:e.body:oa(t)&&Bd(t)?t:$j(t)}function md(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=$j(e),o=a===((s=e.ownerDocument)==null?void 0:s.body),u=us(a);if(o){const c=Y0(u);return t.concat(u,u.visualViewport||[],Bd(a)?a:[],c&&n?md(c):[])}return t.concat(a,md(a,[],n))}function Y0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zj(e){const t=Bs(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const a=oa(e),o=a?e.offsetWidth:n,u=a?e.offsetHeight:s,c=yp(n)!==o||yp(s)!==u;return c&&(n=o,s=u),{width:n,height:s,$:c}}function Ey(e){return Ps(e)?e:e.contextElement}function Hl(e){const t=Ey(e);if(!oa(t))return aa(1);const n=t.getBoundingClientRect(),{width:s,height:a,$:o}=zj(t);let u=(o?yp(n.width):n.width)/s,c=(o?yp(n.height):n.height)/a;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const nG=aa(0);function Gj(e){const t=us(e);return!yy()||!t.visualViewport?nG:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rG(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==us(e)?!1:t}function So(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=Ey(e);let u=aa(1);t&&(s?Ps(s)&&(u=Hl(s)):u=Hl(e));const c=rG(o,n,s)?Gj(o):aa(0);let d=(a.left+c.x)/u.x,h=(a.top+c.y)/u.y,p=a.width/u.x,m=a.height/u.y;if(o){const g=us(o),v=s&&Ps(s)?us(s):s;let C=g,S=Y0(C);for(;S&&s&&v!==C;){const b=Hl(S),y=S.getBoundingClientRect(),E=Bs(S),_=y.left+(S.clientLeft+parseFloat(E.paddingLeft))*b.x,N=y.top+(S.clientTop+parseFloat(E.paddingTop))*b.y;d*=b.x,h*=b.y,p*=b.x,m*=b.y,d+=_,h+=N,C=us(S),S=Y0(C)}}return Sp({width:p,height:m,x:d,y:h})}function Sy(e,t){const n=hm(e).scrollLeft;return t?t.left+n:So(ca(e)).left+n}function qj(e,t,n){n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=s.left+t.scrollLeft-(n?0:Sy(e,s)),o=s.top+t.scrollTop;return{x:a,y:o}}function sG(e){let{elements:t,rect:n,offsetParent:s,strategy:a}=e;const o=a==="fixed",u=ca(s),c=t?dm(t.floating):!1;if(s===u||c&&o)return n;let d={scrollLeft:0,scrollTop:0},h=aa(1);const p=aa(0),m=oa(s);if((m||!m&&!o)&&((bc(s)!=="body"||Bd(u))&&(d=hm(s)),oa(s))){const v=So(s);h=Hl(s),p.x=v.x+s.clientLeft,p.y=v.y+s.clientTop}const g=u&&!m&&!o?qj(u,d,!0):aa(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+g.x,y:n.y*h.y-d.scrollTop*h.y+p.y+g.y}}function aG(e){return Array.from(e.getClientRects())}function iG(e){const t=ca(e),n=hm(e),s=e.ownerDocument.body,a=ls(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=ls(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let u=-n.scrollLeft+Sy(e);const c=-n.scrollTop;return Bs(s).direction==="rtl"&&(u+=ls(t.clientWidth,s.clientWidth)-a),{width:a,height:o,x:u,y:c}}function oG(e,t){const n=us(e),s=ca(e),a=n.visualViewport;let o=s.clientWidth,u=s.clientHeight,c=0,d=0;if(a){o=a.width,u=a.height;const h=yy();(!h||h&&t==="fixed")&&(c=a.offsetLeft,d=a.offsetTop)}return{width:o,height:u,x:c,y:d}}const lG=new Set(["absolute","fixed"]);function cG(e,t){const n=So(e,!0,t==="fixed"),s=n.top+e.clientTop,a=n.left+e.clientLeft,o=oa(e)?Hl(e):aa(1),u=e.clientWidth*o.x,c=e.clientHeight*o.y,d=a*o.x,h=s*o.y;return{width:u,height:c,x:d,y:h}}function ok(e,t,n){let s;if(t==="viewport")s=oG(e,n);else if(t==="document")s=iG(ca(e));else if(Ps(t))s=cG(t,n);else{const a=Gj(e);s={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Sp(s)}function Wj(e,t){const n=Fi(e);return n===t||!Ps(n)||Zl(n)?!1:Bs(n).position==="fixed"||Wj(n,t)}function uG(e,t){const n=t.get(e);if(n)return n;let s=md(e,[],!1).filter(c=>Ps(c)&&bc(c)!=="body"),a=null;const o=Bs(e).position==="fixed";let u=o?Fi(e):e;for(;Ps(u)&&!Zl(u);){const c=Bs(u),d=vy(u);!d&&c.position==="fixed"&&(a=null),(o?!d&&!a:!d&&c.position==="static"&&!!a&&lG.has(a.position)||Bd(u)&&!d&&Wj(e,u))?s=s.filter(p=>p!==u):a=c,u=Fi(u)}return t.set(e,s),s}function dG(e){let{element:t,boundary:n,rootBoundary:s,strategy:a}=e;const u=[...n==="clippingAncestors"?dm(t)?[]:uG(t,this._c):[].concat(n),s],c=u[0],d=u.reduce((h,p)=>{const m=ok(t,p,a);return h.top=ls(m.top,h.top),h.right=Mi(m.right,h.right),h.bottom=Mi(m.bottom,h.bottom),h.left=ls(m.left,h.left),h},ok(t,c,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function hG(e){const{width:t,height:n}=zj(e);return{width:t,height:n}}function fG(e,t,n){const s=oa(t),a=ca(t),o=n==="fixed",u=So(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const d=aa(0);function h(){d.x=Sy(a)}if(s||!s&&!o)if((bc(t)!=="body"||Bd(a))&&(c=hm(t)),s){const v=So(t,!0,o,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else a&&h();o&&!s&&a&&h();const p=a&&!s&&!o?qj(a,c):aa(0),m=u.left+c.scrollLeft-d.x-p.x,g=u.top+c.scrollTop-d.y-p.y;return{x:m,y:g,width:u.width,height:u.height}}function Hx(e){return Bs(e).position==="static"}function lk(e,t){if(!oa(e)||Bs(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ca(e)===n&&(n=n.ownerDocument.body),n}function Vj(e,t){const n=us(e);if(dm(e))return n;if(!oa(e)){let a=Fi(e);for(;a&&!Zl(a);){if(Ps(a)&&!Hx(a))return a;a=Fi(a)}return n}let s=lk(e,t);for(;s&&Kz(s)&&Hx(s);)s=lk(s,t);return s&&Zl(s)&&Hx(s)&&!vy(s)?n:s||eG(e)||n}const pG=async function(e){const t=this.getOffsetParent||Vj,n=this.getDimensions,s=await n(e.floating);return{reference:fG(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function mG(e){return Bs(e).direction==="rtl"}const gG={convertOffsetParentRelativeRectToViewportRelativeRect:sG,getDocumentElement:ca,getClippingRect:dG,getOffsetParent:Vj,getElementRects:pG,getClientRects:aG,getDimensions:hG,getScale:Hl,isElement:Ps,isRTL:mG};function Yj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bG(e,t){let n=null,s;const a=ca(e);function o(){var c;clearTimeout(s),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),o();const h=e.getBoundingClientRect(),{left:p,top:m,width:g,height:v}=h;if(c||t(),!g||!v)return;const C=If(m),S=If(a.clientWidth-(p+g)),b=If(a.clientHeight-(m+v)),y=If(p),_={rootMargin:-C+"px "+-S+"px "+-b+"px "+-y+"px",threshold:ls(0,Mi(1,d))||1};let N=!0;function A(k){const I=k[0].intersectionRatio;if(I!==d){if(!N)return u();I?u(!1,I):s=setTimeout(()=>{u(!1,1e-7)},1e3)}I===1&&!Yj(h,e.getBoundingClientRect())&&u(),N=!1}try{n=new IntersectionObserver(A,{..._,root:a.ownerDocument})}catch{n=new IntersectionObserver(A,_)}n.observe(e)}return u(!0),o}function xG(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=s,h=Ey(e),p=a||o?[...h?md(h):[],...md(t)]:[];p.forEach(y=>{a&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const m=h&&c?bG(h,n):null;let g=-1,v=null;u&&(v=new ResizeObserver(y=>{let[E]=y;E&&E.target===h&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var _;(_=v)==null||_.observe(t)})),n()}),h&&!d&&v.observe(h),v.observe(t));let C,S=d?So(e):null;d&&b();function b(){const y=So(e);S&&!Yj(S,y)&&n(),S=y,C=requestAnimationFrame(b)}return n(),()=>{var y;p.forEach(E=>{a&&E.removeEventListener("scroll",n),o&&E.removeEventListener("resize",n)}),m?.(),(y=v)==null||y.disconnect(),v=null,d&&cancelAnimationFrame(C)}}const vG=zz,yG=Gz,EG=Uz,SG=Wz,_G=Hz,ck=Bz,wG=qz,CG=(e,t,n)=>{const s=new Map,a={platform:gG,...n},o={...a.platform,_c:s};return Pz(e,t,{...a,platform:o})};var NG=typeof document<"u",TG=function(){},np=NG?w.useLayoutEffect:TG;function _p(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!_p(e[s],t[s]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,a[s]))return!1;for(s=n;s--!==0;){const o=a[s];if(!(o==="_owner"&&e.$$typeof)&&!_p(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Kj(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uk(e,t){const n=Kj(e);return Math.round(t*n)/n}function $x(e){const t=w.useRef(e);return np(()=>{t.current=e}),t}function AG(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:a,elements:{reference:o,floating:u}={},transform:c=!0,whileElementsMounted:d,open:h}=e,[p,m]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=w.useState(s);_p(g,s)||v(s);const[C,S]=w.useState(null),[b,y]=w.useState(null),E=w.useCallback(Y=>{Y!==k.current&&(k.current=Y,S(Y))},[]),_=w.useCallback(Y=>{Y!==I.current&&(I.current=Y,y(Y))},[]),N=o||C,A=u||b,k=w.useRef(null),I=w.useRef(null),R=w.useRef(p),M=d!=null,L=$x(d),$=$x(a),H=$x(h),B=w.useCallback(()=>{if(!k.current||!I.current)return;const Y={placement:t,strategy:n,middleware:g};$.current&&(Y.platform=$.current),CG(k.current,I.current,Y).then(F=>{const O={...F,isPositioned:H.current!==!1};z.current&&!_p(R.current,O)&&(R.current=O,cc.flushSync(()=>{m(O)}))})},[g,t,n,$,H]);np(()=>{h===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,m(Y=>({...Y,isPositioned:!1})))},[h]);const z=w.useRef(!1);np(()=>(z.current=!0,()=>{z.current=!1}),[]),np(()=>{if(N&&(k.current=N),A&&(I.current=A),N&&A){if(L.current)return L.current(N,A,B);B()}},[N,A,B,L,M]);const Q=w.useMemo(()=>({reference:k,floating:I,setReference:E,setFloating:_}),[E,_]),P=w.useMemo(()=>({reference:N,floating:A}),[N,A]),X=w.useMemo(()=>{const Y={position:n,left:0,top:0};if(!P.floating)return Y;const F=uk(P.floating,p.x),O=uk(P.floating,p.y);return c?{...Y,transform:"translate("+F+"px, "+O+"px)",...Kj(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:O}},[n,c,P.floating,p.x,p.y]);return w.useMemo(()=>({...p,update:B,refs:Q,elements:P,floatingStyles:X}),[p,B,Q,P,X])}const kG=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:a}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?ck({element:s.current,padding:a}).fn(n):{}:s?ck({element:s,padding:a}).fn(n):{}}}},RG=(e,t)=>({...vG(e),options:[e,t]}),DG=(e,t)=>({...yG(e),options:[e,t]}),IG=(e,t)=>({...wG(e),options:[e,t]}),jG=(e,t)=>({...EG(e),options:[e,t]}),OG=(e,t)=>({...SG(e),options:[e,t]}),LG=(e,t)=>({..._G(e),options:[e,t]}),MG=(e,t)=>({...kG(e),options:[e,t]});var FG="Arrow",Xj=w.forwardRef((e,t)=>{const{children:n,width:s=10,height:a=5,...o}=e;return r.jsx(ht.svg,{...o,ref:t,width:s,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:r.jsx("polygon",{points:"0,0 30,0 15,10"})})});Xj.displayName=FG;var PG=Xj;function _y(e){const[t,n]=w.useState(void 0);return cr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let u,c;if("borderBoxSize"in o){const d=o.borderBoxSize,h=Array.isArray(d)?d[0]:d;u=h.inlineSize,c=h.blockSize}else u=e.offsetWidth,c=e.offsetHeight;n({width:u,height:c})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var wy="Popper",[Zj,xc]=Fr(wy),[BG,Qj]=Zj(wy),Jj=e=>{const{__scopePopper:t,children:n}=e,[s,a]=w.useState(null);return r.jsx(BG,{scope:t,anchor:s,onAnchorChange:a,children:n})};Jj.displayName=wy;var eO="PopperAnchor",tO=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...a}=e,o=Qj(eO,n),u=w.useRef(null),c=Tt(t,u),d=w.useRef(null);return w.useEffect(()=>{const h=d.current;d.current=s?.current||u.current,h!==d.current&&o.onAnchorChange(d.current)}),s?null:r.jsx(ht.div,{...a,ref:c})});tO.displayName=eO;var Cy="PopperContent",[UG,HG]=Zj(Cy),nO=w.forwardRef((e,t)=>{const{__scopePopper:n,side:s="bottom",sideOffset:a=0,align:o="center",alignOffset:u=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:C,...S}=e,b=Qj(Cy,n),[y,E]=w.useState(null),_=Tt(t,K=>E(K)),[N,A]=w.useState(null),k=_y(N),I=k?.width??0,R=k?.height??0,M=s+(o!=="center"?"-"+o:""),L=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},$=Array.isArray(h)?h:[h],H=$.length>0,B={padding:L,boundary:$.filter(zG),altBoundary:H},{refs:z,floatingStyles:Q,placement:P,isPositioned:X,middlewareData:Y}=AG({strategy:"fixed",placement:M,whileElementsMounted:(...K)=>xG(...K,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[RG({mainAxis:a+R,alignmentAxis:u}),d&&DG({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?IG():void 0,...B}),d&&jG({...B}),OG({...B,apply:({elements:K,rects:G,availableWidth:Z,availableHeight:ce})=>{const{width:le,height:ne}=G.reference,pe=K.floating.style;pe.setProperty("--radix-popper-available-width",`${Z}px`),pe.setProperty("--radix-popper-available-height",`${ce}px`),pe.setProperty("--radix-popper-anchor-width",`${le}px`),pe.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),N&&MG({element:N,padding:c}),GG({arrowWidth:I,arrowHeight:R}),g&&LG({strategy:"referenceHidden",...B})]}),[F,O]=aO(P),V=Pn(C);cr(()=>{X&&V?.()},[X,V]);const te=Y.arrow?.x,U=Y.arrow?.y,W=Y.arrow?.centerOffset!==0,[ae,se]=w.useState();return cr(()=>{y&&se(window.getComputedStyle(y).zIndex)},[y]),r.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:X?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:r.jsx(UG,{scope:n,placedSide:F,onArrowChange:A,arrowX:te,arrowY:U,shouldHideArrow:W,children:r.jsx(ht.div,{"data-side":F,"data-align":O,...S,ref:_,style:{...S.style,animation:X?void 0:"none"}})})})});nO.displayName=Cy;var rO="PopperArrow",$G={top:"bottom",right:"left",bottom:"top",left:"right"},sO=w.forwardRef(function(t,n){const{__scopePopper:s,...a}=t,o=HG(rO,s),u=$G[o.placedSide];return r.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:r.jsx(PG,{...a,ref:n,style:{...a.style,display:"block"}})})});sO.displayName=rO;function zG(e){return e!==null}var GG=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:s,middlewareData:a}=t,u=a.arrow?.centerOffset!==0,c=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[h,p]=aO(n),m={start:"0%",center:"50%",end:"100%"}[p],g=(a.arrow?.x??0)+c/2,v=(a.arrow?.y??0)+d/2;let C="",S="";return h==="bottom"?(C=u?m:`${g}px`,S=`${-d}px`):h==="top"?(C=u?m:`${g}px`,S=`${s.floating.height+d}px`):h==="right"?(C=`${-d}px`,S=u?m:`${v}px`):h==="left"&&(C=`${s.floating.width+d}px`,S=u?m:`${v}px`),{data:{x:C,y:S}}}});function aO(e){const[t,n="center"]=e.split("-");return[t,n]}var Ny=Jj,Ty=tO,Ay=nO,ky=sO,[fm,zde]=Fr("Tooltip",[xc]),pm=xc(),iO="TooltipProvider",qG=700,K0="tooltip.open",[WG,Ry]=fm(iO),oO=e=>{const{__scopeTooltip:t,delayDuration:n=qG,skipDelayDuration:s=300,disableHoverableContent:a=!1,children:o}=e,u=w.useRef(!0),c=w.useRef(!1),d=w.useRef(0);return w.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),r.jsx(WG,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(d.current),u.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.current=!0,s)},[s]),isPointerInTransitRef:c,onPointerInTransitChange:w.useCallback(h=>{c.current=h},[]),disableHoverableContent:a,children:o})};oO.displayName=iO;var gd="Tooltip",[VG,mm]=fm(gd),lO=e=>{const{__scopeTooltip:t,children:n,open:s,defaultOpen:a,onOpenChange:o,disableHoverableContent:u,delayDuration:c}=e,d=Ry(gd,e.__scopeTooltip),h=pm(t),[p,m]=w.useState(null),g=Ms(),v=w.useRef(0),C=u??d.disableHoverableContent,S=c??d.delayDuration,b=w.useRef(!1),[y,E]=ia({prop:s,defaultProp:a??!1,onChange:I=>{I?(d.onOpen(),document.dispatchEvent(new CustomEvent(K0))):d.onClose(),o?.(I)},caller:gd}),_=w.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),N=w.useCallback(()=>{window.clearTimeout(v.current),v.current=0,b.current=!1,E(!0)},[E]),A=w.useCallback(()=>{window.clearTimeout(v.current),v.current=0,E(!1)},[E]),k=w.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{b.current=!0,E(!0),v.current=0},S)},[S,E]);return w.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),r.jsx(Ny,{...h,children:r.jsx(VG,{scope:t,contentId:g,open:y,stateAttribute:_,trigger:p,onTriggerChange:m,onTriggerEnter:w.useCallback(()=>{d.isOpenDelayedRef.current?k():N()},[d.isOpenDelayedRef,k,N]),onTriggerLeave:w.useCallback(()=>{C?A():(window.clearTimeout(v.current),v.current=0)},[A,C]),onOpen:N,onClose:A,disableHoverableContent:C,children:n})})};lO.displayName=gd;var X0="TooltipTrigger",cO=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,a=mm(X0,n),o=Ry(X0,n),u=pm(n),c=w.useRef(null),d=Tt(t,c,a.onTriggerChange),h=w.useRef(!1),p=w.useRef(!1),m=w.useCallback(()=>h.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),r.jsx(Ty,{asChild:!0,...u,children:r.jsx(ht.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...s,ref:d,onPointerMove:Ve(e.onPointerMove,g=>{g.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ve(e.onPointerLeave,()=>{a.onTriggerLeave(),p.current=!1}),onPointerDown:Ve(e.onPointerDown,()=>{a.open&&a.onClose(),h.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Ve(e.onFocus,()=>{h.current||a.onOpen()}),onBlur:Ve(e.onBlur,a.onClose),onClick:Ve(e.onClick,a.onClose)})})});cO.displayName=X0;var YG="TooltipPortal",[Gde,KG]=fm(YG,{forceMount:void 0}),Ql="TooltipContent",uO=w.forwardRef((e,t)=>{const n=KG(Ql,e.__scopeTooltip),{forceMount:s=n.forceMount,side:a="top",...o}=e,u=mm(Ql,e.__scopeTooltip);return r.jsx(xr,{present:s||u.open,children:u.disableHoverableContent?r.jsx(dO,{side:a,...o,ref:t}):r.jsx(XG,{side:a,...o,ref:t})})}),XG=w.forwardRef((e,t)=>{const n=mm(Ql,e.__scopeTooltip),s=Ry(Ql,e.__scopeTooltip),a=w.useRef(null),o=Tt(t,a),[u,c]=w.useState(null),{trigger:d,onClose:h}=n,p=a.current,{onPointerInTransitChange:m}=s,g=w.useCallback(()=>{c(null),m(!1)},[m]),v=w.useCallback((C,S)=>{const b=C.currentTarget,y={x:C.clientX,y:C.clientY},E=tq(y,b.getBoundingClientRect()),_=nq(y,E),N=rq(S.getBoundingClientRect()),A=aq([..._,...N]);c(A),m(!0)},[m]);return w.useEffect(()=>()=>g(),[g]),w.useEffect(()=>{if(d&&p){const C=b=>v(b,p),S=b=>v(b,d);return d.addEventListener("pointerleave",C),p.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",C),p.removeEventListener("pointerleave",S)}}},[d,p,v,g]),w.useEffect(()=>{if(u){const C=S=>{const b=S.target,y={x:S.clientX,y:S.clientY},E=d?.contains(b)||p?.contains(b),_=!sq(y,u);E?g():_&&(g(),h())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[d,p,u,h,g]),r.jsx(dO,{...e,ref:o})}),[ZG,QG]=fm(gd,{isInside:!1}),JG=iI("TooltipContent"),dO=w.forwardRef((e,t)=>{const{__scopeTooltip:n,children:s,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:u,...c}=e,d=mm(Ql,n),h=pm(n),{onClose:p}=d;return w.useEffect(()=>(document.addEventListener(K0,p),()=>document.removeEventListener(K0,p)),[p]),w.useEffect(()=>{if(d.trigger){const m=g=>{g.target?.contains(d.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,p]),r.jsx(hc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:r.jsxs(Ay,{"data-state":d.stateAttribute,...h,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[r.jsx(JG,{children:s}),r.jsx(ZG,{scope:n,isInside:!0,children:r.jsx(j7,{id:d.contentId,role:"tooltip",children:a||s})})]})})});uO.displayName=Ql;var hO="TooltipArrow",eq=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,a=pm(n);return QG(hO,n).isInside?null:r.jsx(ky,{...a,...s,ref:t})});eq.displayName=hO;function tq(e,t){const n=Math.abs(t.top-e.y),s=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,s,a,o)){case o:return"left";case a:return"right";case n:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function nq(e,t,n=5){const s=[];switch(t){case"top":s.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":s.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":s.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":s.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return s}function rq(e){const{top:t,right:n,bottom:s,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:s},{x:a,y:s}]}function sq(e,t){const{x:n,y:s}=e;let a=!1;for(let o=0,u=t.length-1;o<t.length;u=o++){const c=t[o],d=t[u],h=c.x,p=c.y,m=d.x,g=d.y;p>s!=g>s&&n<(m-h)*(s-p)/(g-p)+h&&(a=!a)}return a}function aq(e){const t=e.slice();return t.sort((n,s)=>n.x<s.x?-1:n.x>s.x?1:n.y<s.y?-1:n.y>s.y?1:0),iq(t)}function iq(e){if(e.length<=1)return e.slice();const t=[];for(let s=0;s<e.length;s++){const a=e[s];for(;t.length>=2;){const o=t[t.length-1],u=t[t.length-2];if((o.x-u.x)*(a.y-u.y)>=(o.y-u.y)*(a.x-u.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let s=e.length-1;s>=0;s--){const a=e[s];for(;n.length>=2;){const o=n[n.length-1],u=n[n.length-2];if((o.x-u.x)*(a.y-u.y)>=(o.y-u.y)*(a.x-u.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var oq=oO,lq=lO,cq=cO,fO=uO;const uq=oq,dq=lq,hq=cq,pO=w.forwardRef(({className:e,sideOffset:t=4,...n},s)=>r.jsx(fO,{ref:s,sideOffset:t,className:Te("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));pO.displayName=fO.displayName;const fq="sidebar_state",pq=3600*24*7,mq="16rem",gq="18rem",bq="3rem",xq="b",mO=w.createContext(null);function gm(){const e=w.useContext(mO);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const gO=w.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:s,style:a,children:o,...u},c)=>{const d=ij(),[h,p]=w.useState(!1),[m,g]=w.useState(e),v=t??m,C=w.useCallback(E=>{const _=typeof E=="function"?E(v):E;n?n(_):g(_),document.cookie=`${fq}=${_}; path=/; max-age=${pq}`},[n,v]),S=w.useCallback(()=>d?p(E=>!E):C(E=>!E),[d,C,p]);w.useEffect(()=>{const E=_=>{_.key===xq&&(_.metaKey||_.ctrlKey)&&(_.preventDefault(),S())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[S]);const b=v?"expanded":"collapsed",y=w.useMemo(()=>({state:b,open:v,setOpen:C,isMobile:d,openMobile:h,setOpenMobile:p,toggleSidebar:S}),[b,v,C,d,h,p,S]);return r.jsx(mO.Provider,{value:y,children:r.jsx(uq,{delayDuration:0,children:r.jsx("div",{style:{"--sidebar-width":mq,"--sidebar-width-icon":bq,...a},className:Te("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",s),ref:c,...u,children:o})})})});gO.displayName="SidebarProvider";const bO=w.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:s,children:a,...o},u)=>{const{isMobile:c,state:d,openMobile:h,setOpenMobile:p}=gm();return n==="none"?r.jsx("div",{className:Te("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",s),ref:u,...o,children:a}):c?r.jsx(Mj,{open:h,onOpenChange:p,...o,children:r.jsxs(fy,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":gq},side:e,children:[r.jsxs(py,{className:"sr-only",children:[r.jsx(my,{children:"Sidebar"}),r.jsx(Pj,{children:"Displays the mobile sidebar."})]}),r.jsx("div",{className:"flex h-full w-full flex-col",children:a})]})}):r.jsxs("div",{ref:u,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?n:"","data-variant":t,"data-side":e,children:[r.jsx("div",{className:Te("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),r.jsx("div",{className:Te("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...o,children:r.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:a})})]})});bO.displayName="Sidebar";const xO=w.forwardRef(({className:e,onClick:t,...n},s)=>{const{toggleSidebar:a}=gm();return r.jsxs(re,{ref:s,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Te("h-7 w-7",e),onClick:o=>{t?.(o),a()},...n,children:[r.jsx(qU,{}),r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});xO.displayName="SidebarTrigger";const vq=w.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:s}=gm();return r.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:s,title:"Toggle Sidebar",className:Te("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});vq.displayName="SidebarRail";const vO=w.forwardRef(({className:e,...t},n)=>r.jsx("main",{ref:n,className:Te("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));vO.displayName="SidebarInset";const yq=w.forwardRef(({className:e,...t},n)=>r.jsx(Fe,{ref:n,"data-sidebar":"input",className:Te("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));yq.displayName="SidebarInput";const yO=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"header",className:Te("flex flex-col gap-2 p-2",e),...t}));yO.displayName="SidebarHeader";const EO=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"footer",className:Te("flex flex-col gap-2 p-2",e),...t}));EO.displayName="SidebarFooter";const Eq=w.forwardRef(({className:e,...t},n)=>r.jsx(or,{ref:n,"data-sidebar":"separator",className:Te("mx-2 w-auto bg-sidebar-border",e),...t}));Eq.displayName="SidebarSeparator";const SO=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"content",className:Te("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));SO.displayName="SidebarContent";const rp=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group",className:Te("relative flex w-full min-w-0 flex-col p-2",e),...t}));rp.displayName="SidebarGroup";const sp=w.forwardRef(({className:e,asChild:t=!1,...n},s)=>{const a=t?dc:"div";return r.jsx(a,{ref:s,"data-sidebar":"group-label",className:Te("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});sp.displayName="SidebarGroupLabel";const Sq=w.forwardRef(({className:e,asChild:t=!1,...n},s)=>{const a=t?dc:"button";return r.jsx(a,{ref:s,"data-sidebar":"group-action",className:Te("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});Sq.displayName="SidebarGroupAction";const ap=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group-content",className:Te("w-full text-sm",e),...t}));ap.displayName="SidebarGroupContent";const Ol=w.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu",className:Te("flex w-full min-w-0 flex-col gap-1",e),...t}));Ol.displayName="SidebarMenu";const Ll=w.forwardRef(({className:e,...t},n)=>r.jsx("li",{ref:n,"data-sidebar":"menu-item",className:Te("group/menu-item relative",e),...t}));Ll.displayName="SidebarMenuItem";const _q=fc("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Ml=w.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:s="default",tooltip:a,className:o,...u},c)=>{const d=e?dc:"button",{isMobile:h,state:p}=gm(),m=r.jsx(d,{ref:c,"data-sidebar":"menu-button","data-size":s,"data-active":t,className:Te(_q({variant:n,size:s}),o),...u});return a?(typeof a=="string"&&(a={children:a}),r.jsxs(dq,{children:[r.jsx(hq,{asChild:!0,children:m}),r.jsx(pO,{side:"right",align:"center",hidden:p!=="collapsed"||h,...a})]})):m});Ml.displayName="SidebarMenuButton";const wq=w.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...s},a)=>{const o=t?dc:"button";return r.jsx(o,{ref:a,"data-sidebar":"menu-action",className:Te("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...s})});wq.displayName="SidebarMenuAction";const Z0=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:Te("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-full px-1.5 text-xs font-semibold tabular-nums shadow-sm","transition-all duration-200 ease-in-out hover:scale-110","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Z0.displayName="SidebarMenuBadge";const Cq=w.forwardRef(({className:e,showIcon:t=!1,...n},s)=>{const a=w.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return r.jsxs("div",{ref:s,"data-sidebar":"menu-skeleton",className:Te("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&r.jsx(ek,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),r.jsx(ek,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});Cq.displayName="SidebarMenuSkeleton";const Nq=w.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:Te("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));Nq.displayName="SidebarMenuSub";const Tq=w.forwardRef(({...e},t)=>r.jsx("li",{ref:t,...e}));Tq.displayName="SidebarMenuSubItem";const Aq=w.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:s,...a},o)=>{const u=e?dc:"a";return r.jsx(u,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:Te("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...a})});Aq.displayName="SidebarMenuSubButton";const kq="1.0.69-alpha.18",Rq={version:kq};function Dq({className:e}){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[r.jsx("path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"}),r.jsx("path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"}),r.jsx("path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"}),r.jsx("path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"})]})}const Iq=[{title:"Home",url:"/",icon:yU},{title:"Proposals",url:"/proposals",icon:Ku},{title:"Agents",url:"/agents",icon:mr},{title:"Code",url:"/code",icon:ja},{title:"Utilities",url:"/utilities",icon:H0}],jq=[{title:"Overview",url:"/context/project",icon:Nr},{title:"Architecture",url:"/context/architecture",icon:Li},{title:"Knowledge",url:"/context/knowledge",icon:b9},{title:"Resources",url:"/resources",icon:rm}],Oq=[{title:"Source Control",url:"/git",icon:Ri},{title:"Terminal",url:"/terminal",icon:Oa},{title:"Schedule",url:"/schedule",icon:Zf},{title:"Identity",url:"/identity",icon:SU}],Lq=[{title:"Documentation",url:"https://docs.coconut.dev/",icon:zU,external:!0},{title:"Settings",url:"/settings/user",icon:Xl}];function Mq(){const{badges:e}=Kp();return r.jsxs(bO,{className:"bg-sidebar border-r border-sidebar-border",children:[r.jsx(yO,{children:r.jsx(Ol,{children:r.jsx(Ll,{children:r.jsx(Ml,{size:"lg",asChild:!0,className:"[&>svg]:!size-8",children:r.jsxs(it,{to:"/",children:[r.jsx(Dq,{className:"size-8"}),r.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.jsxs("span",{className:"font-semibold",children:[r.jsx("span",{className:"bg-gradient-to-r from-amber-500 via-orange-500 to-yellow-600 bg-clip-text text-transparent",children:"Coconut"}),r.jsx("span",{children:" Studio"})]}),r.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",Rq.version]})]})]})})})})}),r.jsxs(SO,{children:[r.jsxs(rp,{children:[r.jsx(sp,{children:"Main"}),r.jsx(ap,{children:r.jsx(Ol,{children:Iq.map(t=>r.jsxs(Ll,{children:[r.jsx(Ml,{asChild:!0,children:r.jsxs(it,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),t.title==="Code"&&e.codeSessions>0&&r.jsx(Z0,{className:"bg-blue-600 text-white dark:bg-blue-500",children:e.codeSessions})]},t.title))})})]}),r.jsxs(rp,{children:[r.jsx(sp,{children:"Project"}),r.jsx(ap,{children:r.jsx(Ol,{children:jq.map(t=>r.jsx(Ll,{children:r.jsx(Ml,{asChild:!0,children:r.jsxs(it,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]}),r.jsxs(rp,{children:[r.jsx(sp,{children:"System"}),r.jsx(ap,{children:r.jsx(Ol,{children:Oq.map(t=>{let n=0;return t.title==="Source Control"&&e.gitChanges>0?n=e.gitChanges:t.title==="Terminal"&&e.terminalSessions>0?n=e.terminalSessions:t.title==="Schedule"&&e.runningScheduledJobs>0&&(n=e.runningScheduledJobs),r.jsxs(Ll,{children:[r.jsx(Ml,{asChild:!0,children:r.jsxs(it,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),n>0&&r.jsx(Z0,{className:"bg-blue-600 text-white dark:bg-blue-500",children:n})]},t.title)})})})]})]}),r.jsx(EO,{children:r.jsx(Ol,{children:Lq.map(t=>r.jsx(Ll,{children:r.jsx(Ml,{asChild:!0,children:t.external?r.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]}):r.jsxs(it,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]})}function Q0(e,[t,n]){return Math.min(n,Math.max(t,e))}var Fq=w.createContext(void 0);function vc(e){const t=w.useContext(Fq);return e||t||"ltr"}function Dy(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Pq=[" ","Enter","ArrowUp","ArrowDown"],Bq=[" ","Enter"],_o="Select",[bm,xm,Uq]=Zp(_o),[yc,qde]=Fr(_o,[Uq,xc]),vm=xc(),[Hq,Hi]=yc(_o),[$q,zq]=yc(_o),_O=e=>{const{__scopeSelect:t,children:n,open:s,defaultOpen:a,onOpenChange:o,value:u,defaultValue:c,onValueChange:d,dir:h,name:p,autoComplete:m,disabled:g,required:v,form:C}=e,S=vm(t),[b,y]=w.useState(null),[E,_]=w.useState(null),[N,A]=w.useState(!1),k=vc(h),[I,R]=ia({prop:s,defaultProp:a??!1,onChange:o,caller:_o}),[M,L]=ia({prop:u,defaultProp:c,onChange:d,caller:_o}),$=w.useRef(null),H=b?C||!!b.closest("form"):!0,[B,z]=w.useState(new Set),Q=Array.from(B).map(P=>P.props.value).join(";");return r.jsx(Ny,{...S,children:r.jsxs(Hq,{required:v,scope:t,trigger:b,onTriggerChange:y,valueNode:E,onValueNodeChange:_,valueNodeHasChildren:N,onValueNodeHasChildrenChange:A,contentId:Ms(),value:M,onValueChange:L,open:I,onOpenChange:R,dir:k,triggerPointerDownPosRef:$,disabled:g,children:[r.jsx(bm.Provider,{scope:t,children:r.jsx($q,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(P=>{z(X=>new Set(X).add(P))},[]),onNativeOptionRemove:w.useCallback(P=>{z(X=>{const Y=new Set(X);return Y.delete(P),Y})},[]),children:n})}),H?r.jsxs(VO,{"aria-hidden":!0,required:v,tabIndex:-1,name:p,autoComplete:m,value:M,onChange:P=>L(P.target.value),disabled:g,form:C,children:[M===void 0?r.jsx("option",{value:""}):null,Array.from(B)]},Q):null]})})};_O.displayName=_o;var wO="SelectTrigger",CO=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:s=!1,...a}=e,o=vm(n),u=Hi(wO,n),c=u.disabled||s,d=Tt(t,u.onTriggerChange),h=xm(n),p=w.useRef("touch"),[m,g,v]=KO(S=>{const b=h().filter(_=>!_.disabled),y=b.find(_=>_.value===u.value),E=XO(b,S,y);E!==void 0&&u.onValueChange(E.value)}),C=S=>{c||(u.onOpenChange(!0),v()),S&&(u.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return r.jsx(Ty,{asChild:!0,...o,children:r.jsx(ht.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":YO(u.value)?"":void 0,...a,ref:d,onClick:Ve(a.onClick,S=>{S.currentTarget.focus(),p.current!=="mouse"&&C(S)}),onPointerDown:Ve(a.onPointerDown,S=>{p.current=S.pointerType;const b=S.target;b.hasPointerCapture(S.pointerId)&&b.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(C(S),S.preventDefault())}),onKeyDown:Ve(a.onKeyDown,S=>{const b=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&g(S.key),!(b&&S.key===" ")&&Pq.includes(S.key)&&(C(),S.preventDefault())})})})});CO.displayName=wO;var NO="SelectValue",TO=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:a,children:o,placeholder:u="",...c}=e,d=Hi(NO,n),{onValueNodeHasChildrenChange:h}=d,p=o!==void 0,m=Tt(t,d.onValueNodeChange);return cr(()=>{h(p)},[h,p]),r.jsx(ht.span,{...c,ref:m,style:{pointerEvents:"none"},children:YO(d.value)?r.jsx(r.Fragment,{children:u}):o})});TO.displayName=NO;var Gq="SelectIcon",AO=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:s,...a}=e;return r.jsx(ht.span,{"aria-hidden":!0,...a,ref:t,children:s||"▼"})});AO.displayName=Gq;var qq="SelectPortal",kO=e=>r.jsx(Dd,{asChild:!0,...e});kO.displayName=qq;var wo="SelectContent",RO=w.forwardRef((e,t)=>{const n=Hi(wo,e.__scopeSelect),[s,a]=w.useState();if(cr(()=>{a(new DocumentFragment)},[]),!n.open){const o=s;return o?cc.createPortal(r.jsx(DO,{scope:e.__scopeSelect,children:r.jsx(bm.Slot,{scope:e.__scopeSelect,children:r.jsx("div",{children:e.children})})}),o):null}return r.jsx(IO,{...e,ref:t})});RO.displayName=wo;var js=10,[DO,$i]=yc(wo),Wq="SelectContentImpl",Vq=yo("SelectContent.RemoveScroll"),IO=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:s="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:u,side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:g,collisionPadding:v,sticky:C,hideWhenDetached:S,avoidCollisions:b,...y}=e,E=Hi(wo,n),[_,N]=w.useState(null),[A,k]=w.useState(null),I=Tt(t,K=>N(K)),[R,M]=w.useState(null),[L,$]=w.useState(null),H=xm(n),[B,z]=w.useState(!1),Q=w.useRef(!1);w.useEffect(()=>{if(_)return oy(_)},[_]),iy();const P=w.useCallback(K=>{const[G,...Z]=H().map(ne=>ne.ref.current),[ce]=Z.slice(-1),le=document.activeElement;for(const ne of K)if(ne===le||(ne?.scrollIntoView({block:"nearest"}),ne===G&&A&&(A.scrollTop=0),ne===ce&&A&&(A.scrollTop=A.scrollHeight),ne?.focus(),document.activeElement!==le))return},[H,A]),X=w.useCallback(()=>P([R,_]),[P,R,_]);w.useEffect(()=>{B&&X()},[B,X]);const{onOpenChange:Y,triggerPointerDownPosRef:F}=E;w.useEffect(()=>{if(_){let K={x:0,y:0};const G=ce=>{K={x:Math.abs(Math.round(ce.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(ce.pageY)-(F.current?.y??0))}},Z=ce=>{K.x<=10&&K.y<=10?ce.preventDefault():_.contains(ce.target)||Y(!1),document.removeEventListener("pointermove",G),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",Z,{capture:!0})}}},[_,Y,F]),w.useEffect(()=>{const K=()=>Y(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[Y]);const[O,V]=KO(K=>{const G=H().filter(le=>!le.disabled),Z=G.find(le=>le.ref.current===document.activeElement),ce=XO(G,K,Z);ce&&setTimeout(()=>ce.ref.current.focus())}),te=w.useCallback((K,G,Z)=>{const ce=!Q.current&&!Z;(E.value!==void 0&&E.value===G||ce)&&(M(K),ce&&(Q.current=!0))},[E.value]),U=w.useCallback(()=>_?.focus(),[_]),W=w.useCallback((K,G,Z)=>{const ce=!Q.current&&!Z;(E.value!==void 0&&E.value===G||ce)&&$(K)},[E.value]),ae=s==="popper"?J0:jO,se=ae===J0?{side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:g,collisionPadding:v,sticky:C,hideWhenDetached:S,avoidCollisions:b}:{};return r.jsx(DO,{scope:n,content:_,viewport:A,onViewportChange:k,itemRefCallback:te,selectedItem:R,onItemLeave:U,itemTextRefCallback:W,focusSelectedItem:X,selectedItemText:L,position:s,isPositioned:B,searchRef:O,children:r.jsx(om,{as:Vq,allowPinchZoom:!0,children:r.jsx(am,{asChild:!0,trapped:E.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:Ve(a,K=>{E.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:r.jsx(hc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:r.jsx(ae,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:K=>K.preventDefault(),...y,...se,onPlaced:()=>z(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Ve(y.onKeyDown,K=>{const G=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!G&&K.key.length===1&&V(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let ce=H().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(K.key)&&(ce=ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const le=K.target,ne=ce.indexOf(le);ce=ce.slice(ne+1)}setTimeout(()=>P(ce)),K.preventDefault()}})})})})})})});IO.displayName=Wq;var Yq="SelectItemAlignedPosition",jO=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:s,...a}=e,o=Hi(wo,n),u=$i(wo,n),[c,d]=w.useState(null),[h,p]=w.useState(null),m=Tt(t,I=>p(I)),g=xm(n),v=w.useRef(!1),C=w.useRef(!0),{viewport:S,selectedItem:b,selectedItemText:y,focusSelectedItem:E}=u,_=w.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&h&&S&&b&&y){const I=o.trigger.getBoundingClientRect(),R=h.getBoundingClientRect(),M=o.valueNode.getBoundingClientRect(),L=y.getBoundingClientRect();if(o.dir!=="rtl"){const le=L.left-R.left,ne=M.left-le,pe=I.left-ne,ye=I.width+pe,Ge=Math.max(ye,R.width),Ke=window.innerWidth-js,Re=Q0(ne,[js,Math.max(js,Ke-Ge)]);c.style.minWidth=ye+"px",c.style.left=Re+"px"}else{const le=R.right-L.right,ne=window.innerWidth-M.right-le,pe=window.innerWidth-I.right-ne,ye=I.width+pe,Ge=Math.max(ye,R.width),Ke=window.innerWidth-js,Re=Q0(ne,[js,Math.max(js,Ke-Ge)]);c.style.minWidth=ye+"px",c.style.right=Re+"px"}const $=g(),H=window.innerHeight-js*2,B=S.scrollHeight,z=window.getComputedStyle(h),Q=parseInt(z.borderTopWidth,10),P=parseInt(z.paddingTop,10),X=parseInt(z.borderBottomWidth,10),Y=parseInt(z.paddingBottom,10),F=Q+P+B+Y+X,O=Math.min(b.offsetHeight*5,F),V=window.getComputedStyle(S),te=parseInt(V.paddingTop,10),U=parseInt(V.paddingBottom,10),W=I.top+I.height/2-js,ae=H-W,se=b.offsetHeight/2,K=b.offsetTop+se,G=Q+P+K,Z=F-G;if(G<=W){const le=$.length>0&&b===$[$.length-1].ref.current;c.style.bottom="0px";const ne=h.clientHeight-S.offsetTop-S.offsetHeight,pe=Math.max(ae,se+(le?U:0)+ne+X),ye=G+pe;c.style.height=ye+"px"}else{const le=$.length>0&&b===$[0].ref.current;c.style.top="0px";const pe=Math.max(W,Q+S.offsetTop+(le?te:0)+se)+Z;c.style.height=pe+"px",S.scrollTop=G-W+S.offsetTop}c.style.margin=`${js}px 0`,c.style.minHeight=O+"px",c.style.maxHeight=H+"px",s?.(),requestAnimationFrame(()=>v.current=!0)}},[g,o.trigger,o.valueNode,c,h,S,b,y,o.dir,s]);cr(()=>_(),[_]);const[N,A]=w.useState();cr(()=>{h&&A(window.getComputedStyle(h).zIndex)},[h]);const k=w.useCallback(I=>{I&&C.current===!0&&(_(),E?.(),C.current=!1)},[_,E]);return r.jsx(Xq,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:v,onScrollButtonChange:k,children:r.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:r.jsx(ht.div,{...a,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});jO.displayName=Yq;var Kq="SelectPopperPosition",J0=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:s="start",collisionPadding:a=js,...o}=e,u=vm(n);return r.jsx(Ay,{...u,...o,ref:t,align:s,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});J0.displayName=Kq;var[Xq,Iy]=yc(wo,{}),ev="SelectViewport",OO=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:s,...a}=e,o=$i(ev,n),u=Iy(ev,n),c=Tt(t,o.onViewportChange),d=w.useRef(0);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),r.jsx(bm.Slot,{scope:n,children:r.jsx(ht.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Ve(a.onScroll,h=>{const p=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:g}=u;if(g?.current&&m){const v=Math.abs(d.current-p.scrollTop);if(v>0){const C=window.innerHeight-js*2,S=parseFloat(m.style.minHeight),b=parseFloat(m.style.height),y=Math.max(S,b);if(y<C){const E=y+v,_=Math.min(C,E),N=E-_;m.style.height=_+"px",m.style.bottom==="0px"&&(p.scrollTop=N>0?N:0,m.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});OO.displayName=ev;var LO="SelectGroup",[Zq,Qq]=yc(LO),Jq=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=Ms();return r.jsx(Zq,{scope:n,id:a,children:r.jsx(ht.div,{role:"group","aria-labelledby":a,...s,ref:t})})});Jq.displayName=LO;var MO="SelectLabel",FO=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=Qq(MO,n);return r.jsx(ht.div,{id:a.id,...s,ref:t})});FO.displayName=MO;var wp="SelectItem",[eW,PO]=yc(wp),BO=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:s,disabled:a=!1,textValue:o,...u}=e,c=Hi(wp,n),d=$i(wp,n),h=c.value===s,[p,m]=w.useState(o??""),[g,v]=w.useState(!1),C=Tt(t,E=>d.itemRefCallback?.(E,s,a)),S=Ms(),b=w.useRef("touch"),y=()=>{a||(c.onValueChange(s),c.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return r.jsx(eW,{scope:n,value:s,disabled:a,textId:S,isSelected:h,onItemTextChange:w.useCallback(E=>{m(_=>_||(E?.textContent??"").trim())},[]),children:r.jsx(bm.ItemSlot,{scope:n,value:s,disabled:a,textValue:p,children:r.jsx(ht.div,{role:"option","aria-labelledby":S,"data-highlighted":g?"":void 0,"aria-selected":h&&g,"data-state":h?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...u,ref:C,onFocus:Ve(u.onFocus,()=>v(!0)),onBlur:Ve(u.onBlur,()=>v(!1)),onClick:Ve(u.onClick,()=>{b.current!=="mouse"&&y()}),onPointerUp:Ve(u.onPointerUp,()=>{b.current==="mouse"&&y()}),onPointerDown:Ve(u.onPointerDown,E=>{b.current=E.pointerType}),onPointerMove:Ve(u.onPointerMove,E=>{b.current=E.pointerType,a?d.onItemLeave?.():b.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ve(u.onPointerLeave,E=>{E.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:Ve(u.onKeyDown,E=>{d.searchRef?.current!==""&&E.key===" "||(Bq.includes(E.key)&&y(),E.key===" "&&E.preventDefault())})})})})});BO.displayName=wp;var Gu="SelectItemText",UO=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:a,...o}=e,u=Hi(Gu,n),c=$i(Gu,n),d=PO(Gu,n),h=zq(Gu,n),[p,m]=w.useState(null),g=Tt(t,y=>m(y),d.onItemTextChange,y=>c.itemTextRefCallback?.(y,d.value,d.disabled)),v=p?.textContent,C=w.useMemo(()=>r.jsx("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:S,onNativeOptionRemove:b}=h;return cr(()=>(S(C),()=>b(C)),[S,b,C]),r.jsxs(r.Fragment,{children:[r.jsx(ht.span,{id:d.textId,...o,ref:g}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?cc.createPortal(o.children,u.valueNode):null]})});UO.displayName=Gu;var HO="SelectItemIndicator",$O=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return PO(HO,n).isSelected?r.jsx(ht.span,{"aria-hidden":!0,...s,ref:t}):null});$O.displayName=HO;var tv="SelectScrollUpButton",zO=w.forwardRef((e,t)=>{const n=$i(tv,e.__scopeSelect),s=Iy(tv,e.__scopeSelect),[a,o]=w.useState(!1),u=Tt(t,s.onScrollButtonChange);return cr(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollTop>0;o(h)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?r.jsx(qO,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});zO.displayName=tv;var nv="SelectScrollDownButton",GO=w.forwardRef((e,t)=>{const n=$i(nv,e.__scopeSelect),s=Iy(nv,e.__scopeSelect),[a,o]=w.useState(!1),u=Tt(t,s.onScrollButtonChange);return cr(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<h;o(p)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?r.jsx(qO,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});GO.displayName=nv;var qO=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:s,...a}=e,o=$i("SelectScrollButton",n),u=w.useRef(null),c=xm(n),d=w.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return w.useEffect(()=>()=>d(),[d]),cr(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),r.jsx(ht.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Ve(a.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(s,50))}),onPointerMove:Ve(a.onPointerMove,()=>{o.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(s,50))}),onPointerLeave:Ve(a.onPointerLeave,()=>{d()})})}),tW="SelectSeparator",WO=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return r.jsx(ht.div,{"aria-hidden":!0,...s,ref:t})});WO.displayName=tW;var rv="SelectArrow",nW=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=vm(n),o=Hi(rv,n),u=$i(rv,n);return o.open&&u.position==="popper"?r.jsx(ky,{...a,...s,ref:t}):null});nW.displayName=rv;var rW="SelectBubbleInput",VO=w.forwardRef(({__scopeSelect:e,value:t,...n},s)=>{const a=w.useRef(null),o=Tt(s,a),u=Dy(t);return w.useEffect(()=>{const c=a.current;if(!c)return;const d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(u!==t&&p){const m=new Event("change",{bubbles:!0});p.call(c,t),c.dispatchEvent(m)}},[u,t]),r.jsx(ht.select,{...n,style:{...uI,...n.style},ref:o,defaultValue:t})});VO.displayName=rW;function YO(e){return e===""||e===void 0}function KO(e){const t=Pn(e),n=w.useRef(""),s=w.useRef(0),a=w.useCallback(u=>{const c=n.current+u;t(c),(function d(h){n.current=h,window.clearTimeout(s.current),h!==""&&(s.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),o=w.useCallback(()=>{n.current="",window.clearTimeout(s.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(s.current),[]),[n,a,o]}function XO(e,t,n){const a=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let u=sW(e,Math.max(o,0));a.length===1&&(u=u.filter(h=>h!==n));const d=u.find(h=>h.textValue.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function sW(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var aW=_O,ZO=CO,iW=TO,oW=AO,lW=kO,QO=RO,cW=OO,JO=FO,e3=BO,uW=UO,dW=$O,t3=zO,n3=GO,r3=WO;const Zt=aW,Qt=iW,Wt=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(ZO,{ref:s,className:Te("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,r.jsx(oW,{asChild:!0,children:r.jsx(Fn,{className:"h-4 w-4 opacity-50"})})]}));Wt.displayName=ZO.displayName;const s3=w.forwardRef(({className:e,...t},n)=>r.jsx(t3,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(Kl,{className:"h-4 w-4"})}));s3.displayName=t3.displayName;const a3=w.forwardRef(({className:e,...t},n)=>r.jsx(n3,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(Fn,{className:"h-4 w-4"})}));a3.displayName=n3.displayName;const Vt=w.forwardRef(({className:e,children:t,position:n="popper",...s},a)=>r.jsx(lW,{children:r.jsxs(QO,{ref:a,className:Te("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...s,children:[r.jsx(s3,{}),r.jsx(cW,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),r.jsx(a3,{})]})}));Vt.displayName=QO.displayName;const hW=w.forwardRef(({className:e,...t},n)=>r.jsx(JO,{ref:n,className:Te("px-2 py-1.5 text-sm font-semibold",e),...t}));hW.displayName=JO.displayName;const Le=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(e3,{ref:s,className:Te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(dW,{children:r.jsx(os,{className:"h-4 w-4"})})}),r.jsx(uW,{children:t})]}));Le.displayName=e3.displayName;const fW=w.forwardRef(({className:e,...t},n)=>r.jsx(r3,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));fW.displayName=r3.displayName;const fn=dy,Cp=Lj,pW=hy,i3=w.forwardRef(({className:e,...t},n)=>r.jsx(Ld,{ref:n,className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));i3.displayName=Ld.displayName;const ln=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(pW,{children:[r.jsx(i3,{}),r.jsxs(Md,{ref:s,className:Te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,r.jsxs(cm,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r.jsx(Tr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ln.displayName=Md.displayName;const nn=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});nn.displayName="DialogHeader";const lr=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});lr.displayName="DialogFooter";const rn=w.forwardRef(({className:e,...t},n)=>r.jsx(Fd,{ref:n,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));rn.displayName=Fd.displayName;const _n=w.forwardRef(({className:e,...t},n)=>r.jsx(Pd,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));_n.displayName=Pd.displayName;var ym="Checkbox",[mW,Wde]=Fr(ym),[gW,jy]=mW(ym);function bW(e){const{__scopeCheckbox:t,checked:n,children:s,defaultChecked:a,disabled:o,form:u,name:c,onCheckedChange:d,required:h,value:p="on",internal_do_not_use_render:m}=e,[g,v]=ia({prop:n,defaultProp:a??!1,onChange:d,caller:ym}),[C,S]=w.useState(null),[b,y]=w.useState(null),E=w.useRef(!1),_=C?!!u||!!C.closest("form"):!0,N={checked:g,disabled:o,setChecked:v,control:C,setControl:S,name:c,form:u,value:p,hasConsumerStoppedPropagationRef:E,required:h,defaultChecked:ji(a)?!1:a,isFormControl:_,bubbleInput:b,setBubbleInput:y};return r.jsx(gW,{scope:t,...N,children:xW(m)?m(N):s})}var o3="CheckboxTrigger",l3=w.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...s},a)=>{const{control:o,value:u,disabled:c,checked:d,required:h,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:C}=jy(o3,e),S=Tt(a,p),b=w.useRef(d);return w.useEffect(()=>{const y=o?.form;if(y){const E=()=>m(b.current);return y.addEventListener("reset",E),()=>y.removeEventListener("reset",E)}},[o,m]),r.jsx(ht.button,{type:"button",role:"checkbox","aria-checked":ji(d)?"mixed":d,"aria-required":h,"data-state":f3(d),"data-disabled":c?"":void 0,disabled:c,value:u,...s,ref:S,onKeyDown:Ve(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Ve(n,y=>{m(E=>ji(E)?!0:!E),C&&v&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})});l3.displayName=o3;var Oy=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:s,checked:a,defaultChecked:o,required:u,disabled:c,value:d,onCheckedChange:h,form:p,...m}=e;return r.jsx(bW,{__scopeCheckbox:n,checked:a,defaultChecked:o,disabled:c,required:u,onCheckedChange:h,name:s,form:p,value:d,internal_do_not_use_render:({isFormControl:g})=>r.jsxs(r.Fragment,{children:[r.jsx(l3,{...m,ref:t,__scopeCheckbox:n}),g&&r.jsx(h3,{__scopeCheckbox:n})]})})});Oy.displayName=ym;var c3="CheckboxIndicator",u3=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:s,...a}=e,o=jy(c3,n);return r.jsx(xr,{present:s||ji(o.checked)||o.checked===!0,children:r.jsx(ht.span,{"data-state":f3(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});u3.displayName=c3;var d3="CheckboxBubbleInput",h3=w.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:s,hasConsumerStoppedPropagationRef:a,checked:o,defaultChecked:u,required:c,disabled:d,name:h,value:p,form:m,bubbleInput:g,setBubbleInput:v}=jy(d3,e),C=Tt(n,v),S=Dy(o),b=_y(s);w.useEffect(()=>{const E=g;if(!E)return;const _=window.HTMLInputElement.prototype,A=Object.getOwnPropertyDescriptor(_,"checked").set,k=!a.current;if(S!==o&&A){const I=new Event("click",{bubbles:k});E.indeterminate=ji(o),A.call(E,ji(o)?!1:o),E.dispatchEvent(I)}},[g,S,o,a]);const y=w.useRef(ji(o)?!1:o);return r.jsx(ht.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??y.current,required:c,disabled:d,name:h,value:p,form:m,...t,tabIndex:-1,ref:C,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});h3.displayName=d3;function xW(e){return typeof e=="function"}function ji(e){return e==="indeterminate"}function f3(e){return ji(e)?"indeterminate":e?"checked":"unchecked"}const ds=w.forwardRef(({className:e,...t},n)=>r.jsx(Oy,{ref:n,className:Te("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:r.jsx(u3,{className:Te("flex items-center justify-center text-current"),children:r.jsx(os,{className:"h-4 w-4"})})}));ds.displayName=Oy.displayName;const Fa=w.forwardRef(({className:e,onCheckedChange:t,onChange:n,...s},a)=>{const o=u=>{n?.(u),t?.(u.target.checked)};return r.jsxs("label",{className:Te("relative inline-flex cursor-pointer",e),children:[r.jsx("input",{type:"checkbox",className:"sr-only peer",onChange:o,ref:a,...s}),r.jsx("div",{className:"block bg-gray-300 w-9 h-5 rounded-full transition-colors duration-200 ease-in-out peer-checked:bg-blue-600"}),r.jsx("div",{className:"absolute left-0 top-0 bg-white w-4 h-4 rounded-full mt-0.5 ml-0.5 transition-transform duration-200 ease-in-out transform peer-checked:translate-x-4 shadow"})]})});Fa.displayName="Switch";function vW(e,t){return w.useReducer((n,s)=>t[n][s]??n,e)}var Ly="ScrollArea",[p3,Vde]=Fr(Ly),[yW,As]=p3(Ly),m3=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:s="hover",dir:a,scrollHideDelay:o=600,...u}=e,[c,d]=w.useState(null),[h,p]=w.useState(null),[m,g]=w.useState(null),[v,C]=w.useState(null),[S,b]=w.useState(null),[y,E]=w.useState(0),[_,N]=w.useState(0),[A,k]=w.useState(!1),[I,R]=w.useState(!1),M=Tt(t,$=>d($)),L=vc(a);return r.jsx(yW,{scope:n,type:s,dir:L,scrollHideDelay:o,scrollArea:c,viewport:h,onViewportChange:p,content:m,onContentChange:g,scrollbarX:v,onScrollbarXChange:C,scrollbarXEnabled:A,onScrollbarXEnabledChange:k,scrollbarY:S,onScrollbarYChange:b,scrollbarYEnabled:I,onScrollbarYEnabledChange:R,onCornerWidthChange:E,onCornerHeightChange:N,children:r.jsx(ht.div,{dir:L,...u,ref:M,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});m3.displayName=Ly;var g3="ScrollAreaViewport",b3=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:s,nonce:a,...o}=e,u=As(g3,n),c=w.useRef(null),d=Tt(t,c,u.onViewportChange);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),r.jsx(ht.div,{"data-radix-scroll-area-viewport":"",...o,ref:d,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:r.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});b3.displayName=g3;var ua="ScrollAreaScrollbar",My=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=As(ua,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:u}=a,c=e.orientation==="horizontal";return w.useEffect(()=>(c?o(!0):u(!0),()=>{c?o(!1):u(!1)}),[c,o,u]),a.type==="hover"?r.jsx(EW,{...s,ref:t,forceMount:n}):a.type==="scroll"?r.jsx(SW,{...s,ref:t,forceMount:n}):a.type==="auto"?r.jsx(x3,{...s,ref:t,forceMount:n}):a.type==="always"?r.jsx(Fy,{...s,ref:t}):null});My.displayName=ua;var EW=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=As(ua,e.__scopeScrollArea),[o,u]=w.useState(!1);return w.useEffect(()=>{const c=a.scrollArea;let d=0;if(c){const h=()=>{window.clearTimeout(d),u(!0)},p=()=>{d=window.setTimeout(()=>u(!1),a.scrollHideDelay)};return c.addEventListener("pointerenter",h),c.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",h),c.removeEventListener("pointerleave",p)}}},[a.scrollArea,a.scrollHideDelay]),r.jsx(xr,{present:n||o,children:r.jsx(x3,{"data-state":o?"visible":"hidden",...s,ref:t})})}),SW=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=As(ua,e.__scopeScrollArea),o=e.orientation==="horizontal",u=Sm(()=>d("SCROLL_END"),100),[c,d]=vW("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(c==="idle"){const h=window.setTimeout(()=>d("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(h)}},[c,a.scrollHideDelay,d]),w.useEffect(()=>{const h=a.viewport,p=o?"scrollLeft":"scrollTop";if(h){let m=h[p];const g=()=>{const v=h[p];m!==v&&(d("SCROLL"),u()),m=v};return h.addEventListener("scroll",g),()=>h.removeEventListener("scroll",g)}},[a.viewport,o,d,u]),r.jsx(xr,{present:n||c!=="hidden",children:r.jsx(Fy,{"data-state":c==="hidden"?"hidden":"visible",...s,ref:t,onPointerEnter:Ve(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Ve(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),x3=w.forwardRef((e,t)=>{const n=As(ua,e.__scopeScrollArea),{forceMount:s,...a}=e,[o,u]=w.useState(!1),c=e.orientation==="horizontal",d=Sm(()=>{if(n.viewport){const h=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;u(c?h:p)}},10);return Jl(n.viewport,d),Jl(n.content,d),r.jsx(xr,{present:s||o,children:r.jsx(Fy,{"data-state":o?"visible":"hidden",...a,ref:t})})}),Fy=w.forwardRef((e,t)=>{const{orientation:n="vertical",...s}=e,a=As(ua,e.__scopeScrollArea),o=w.useRef(null),u=w.useRef(0),[c,d]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=_3(c.viewport,c.content),p={...s,sizes:c,onSizesChange:d,hasThumb:h>0&&h<1,onThumbChange:g=>o.current=g,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:g=>u.current=g};function m(g,v){return AW(g,u.current,c,v)}return n==="horizontal"?r.jsx(_W,{...p,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const g=a.viewport.scrollLeft,v=dk(g,c,a.dir);o.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:g=>{a.viewport&&(a.viewport.scrollLeft=g)},onDragScroll:g=>{a.viewport&&(a.viewport.scrollLeft=m(g,a.dir))}}):n==="vertical"?r.jsx(wW,{...p,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const g=a.viewport.scrollTop,v=dk(g,c);o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:g=>{a.viewport&&(a.viewport.scrollTop=g)},onDragScroll:g=>{a.viewport&&(a.viewport.scrollTop=m(g))}}):null}),_W=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:s,...a}=e,o=As(ua,e.__scopeScrollArea),[u,c]=w.useState(),d=w.useRef(null),h=Tt(t,d,o.onScrollbarXChange);return w.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(y3,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Em(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,m)=>{if(o.viewport){const g=o.viewport.scrollLeft+p.deltaX;e.onWheelScroll(g),C3(g,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&s({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Tp(u.paddingLeft),paddingEnd:Tp(u.paddingRight)}})}})}),wW=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:s,...a}=e,o=As(ua,e.__scopeScrollArea),[u,c]=w.useState(),d=w.useRef(null),h=Tt(t,d,o.onScrollbarYChange);return w.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(y3,{"data-orientation":"vertical",...a,ref:h,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Em(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,m)=>{if(o.viewport){const g=o.viewport.scrollTop+p.deltaY;e.onWheelScroll(g),C3(g,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&s({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Tp(u.paddingTop),paddingEnd:Tp(u.paddingBottom)}})}})}),[CW,v3]=p3(ua),y3=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:s,hasThumb:a,onThumbChange:o,onThumbPointerUp:u,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:h,onWheelScroll:p,onResize:m,...g}=e,v=As(ua,n),[C,S]=w.useState(null),b=Tt(t,M=>S(M)),y=w.useRef(null),E=w.useRef(""),_=v.viewport,N=s.content-s.viewport,A=Pn(p),k=Pn(d),I=Sm(m,10);function R(M){if(y.current){const L=M.clientX-y.current.left,$=M.clientY-y.current.top;h({x:L,y:$})}}return w.useEffect(()=>{const M=L=>{const $=L.target;C?.contains($)&&A(L,N)};return document.addEventListener("wheel",M,{passive:!1}),()=>document.removeEventListener("wheel",M,{passive:!1})},[_,C,N,A]),w.useEffect(k,[s,k]),Jl(C,I),Jl(v.content,I),r.jsx(CW,{scope:n,scrollbar:C,hasThumb:a,onThumbChange:Pn(o),onThumbPointerUp:Pn(u),onThumbPositionChange:k,onThumbPointerDown:Pn(c),children:r.jsx(ht.div,{...g,ref:b,style:{position:"absolute",...g.style},onPointerDown:Ve(e.onPointerDown,M=>{M.button===0&&(M.target.setPointerCapture(M.pointerId),y.current=C.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),R(M))}),onPointerMove:Ve(e.onPointerMove,R),onPointerUp:Ve(e.onPointerUp,M=>{const L=M.target;L.hasPointerCapture(M.pointerId)&&L.releasePointerCapture(M.pointerId),document.body.style.webkitUserSelect=E.current,v.viewport&&(v.viewport.style.scrollBehavior=""),y.current=null})})})}),Np="ScrollAreaThumb",E3=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=v3(Np,e.__scopeScrollArea);return r.jsx(xr,{present:n||a.hasThumb,children:r.jsx(NW,{ref:t,...s})})}),NW=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:s,...a}=e,o=As(Np,n),u=v3(Np,n),{onThumbPositionChange:c}=u,d=Tt(t,m=>u.onThumbChange(m)),h=w.useRef(void 0),p=Sm(()=>{h.current&&(h.current(),h.current=void 0)},100);return w.useEffect(()=>{const m=o.viewport;if(m){const g=()=>{if(p(),!h.current){const v=kW(m,c);h.current=v,c()}};return c(),m.addEventListener("scroll",g),()=>m.removeEventListener("scroll",g)}},[o.viewport,p,c]),r.jsx(ht.div,{"data-state":u.hasThumb?"visible":"hidden",...a,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:Ve(e.onPointerDownCapture,m=>{const v=m.target.getBoundingClientRect(),C=m.clientX-v.left,S=m.clientY-v.top;u.onThumbPointerDown({x:C,y:S})}),onPointerUp:Ve(e.onPointerUp,u.onThumbPointerUp)})});E3.displayName=Np;var Py="ScrollAreaCorner",S3=w.forwardRef((e,t)=>{const n=As(Py,e.__scopeScrollArea),s=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&s?r.jsx(TW,{...e,ref:t}):null});S3.displayName=Py;var TW=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...s}=e,a=As(Py,n),[o,u]=w.useState(0),[c,d]=w.useState(0),h=!!(o&&c);return Jl(a.scrollbarX,()=>{const p=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(p),d(p)}),Jl(a.scrollbarY,()=>{const p=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(p),u(p)}),h?r.jsx(ht.div,{...s,ref:t,style:{width:o,height:c,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Tp(e){return e?parseInt(e,10):0}function _3(e,t){const n=e/t;return isNaN(n)?0:n}function Em(e){const t=_3(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=(e.scrollbar.size-n)*t;return Math.max(s,18)}function AW(e,t,n,s="ltr"){const a=Em(n),o=a/2,u=t||o,c=a-u,d=n.scrollbar.paddingStart+u,h=n.scrollbar.size-n.scrollbar.paddingEnd-c,p=n.content-n.viewport,m=s==="ltr"?[0,p]:[p*-1,0];return w3([d,h],m)(e)}function dk(e,t,n="ltr"){const s=Em(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,u=t.content-t.viewport,c=o-s,d=n==="ltr"?[0,u]:[u*-1,0],h=Q0(e,d);return w3([0,u],[0,c])(h)}function w3(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const s=(t[1]-t[0])/(e[1]-e[0]);return t[0]+s*(n-e[0])}}function C3(e,t){return e>0&&e<t}var kW=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},s=0;return(function a(){const o={left:e.scrollLeft,top:e.scrollTop},u=n.left!==o.left,c=n.top!==o.top;(u||c)&&t(),n=o,s=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(s)};function Sm(e,t){const n=Pn(e),s=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(s.current),[]),w.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(n,t)},[n,t])}function Jl(e,t){const n=Pn(t);cr(()=>{let s=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(s),a.unobserve(e)}}},[e,n])}var N3=m3,RW=b3,DW=S3;const Ns=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(N3,{ref:s,className:Te("relative overflow-hidden",e),...n,children:[r.jsx(RW,{className:"h-full w-full rounded-[inherit]",children:t}),r.jsx(T3,{}),r.jsx(DW,{})]}));Ns.displayName=N3.displayName;const T3=w.forwardRef(({className:e,orientation:t="vertical",...n},s)=>r.jsx(My,{ref:s,orientation:t,className:Te("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:r.jsx(E3,{className:"relative flex-1 rounded-full bg-border"})}));T3.displayName=My.displayName;function bd(e){const t=[],n=String(e||"");let s=n.indexOf(","),a=0,o=!1;for(;!o;){s===-1&&(s=n.length,o=!0);const u=n.slice(a,s).trim();(u||!o)&&t.push(u),a=s+1,s=n.indexOf(",",a)}return t}function _m(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const IW=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jW=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,OW={};function hk(e,t){return(OW.jsx?jW:IW).test(e)}const LW=/[ \t\n\f\r]/g;function Ud(e){return typeof e=="object"?e.type==="text"?fk(e.value):!1:fk(e)}function fk(e){return e.replace(LW,"")===""}let Hd=class{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}};Hd.prototype.normal={};Hd.prototype.property={};Hd.prototype.space=void 0;function A3(e,t){const n={},s={};for(const a of e)Object.assign(n,a.property),Object.assign(s,a.normal);return new Hd(n,s,t)}function xd(e){return e.toLowerCase()}let Zr=class{constructor(t,n){this.attribute=n,this.property=t}};Zr.prototype.attribute="";Zr.prototype.booleanish=!1;Zr.prototype.boolean=!1;Zr.prototype.commaOrSpaceSeparated=!1;Zr.prototype.commaSeparated=!1;Zr.prototype.defined=!1;Zr.prototype.mustUseProperty=!1;Zr.prototype.number=!1;Zr.prototype.overloadedBoolean=!1;Zr.prototype.property="";Zr.prototype.spaceSeparated=!1;Zr.prototype.space=void 0;let MW=0;const It=ko(),Gn=ko(),sv=ko(),qe=ko(),vn=ko(),$l=ko(),as=ko();function ko(){return 2**++MW}const av=Object.freeze(Object.defineProperty({__proto__:null,boolean:It,booleanish:Gn,commaOrSpaceSeparated:as,commaSeparated:$l,number:qe,overloadedBoolean:sv,spaceSeparated:vn},Symbol.toStringTag,{value:"Module"})),zx=Object.keys(av);let By=class extends Zr{constructor(t,n,s,a){let o=-1;if(super(t,n),pk(this,"space",a),typeof s=="number")for(;++o<zx.length;){const u=zx[o];pk(this,zx[o],(s&av[u])===av[u])}}};By.prototype.defined=!0;function pk(e,t,n){n&&(e[t]=n)}function Ec(e){const t={},n={};for(const[s,a]of Object.entries(e.properties)){const o=new By(s,e.transform(e.attributes||{},s),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[xd(s)]=s,n[xd(o.attribute)]=s}return new Hd(t,n,e.space)}const k3=Ec({properties:{ariaActiveDescendant:null,ariaAtomic:Gn,ariaAutoComplete:null,ariaBusy:Gn,ariaChecked:Gn,ariaColCount:qe,ariaColIndex:qe,ariaColSpan:qe,ariaControls:vn,ariaCurrent:null,ariaDescribedBy:vn,ariaDetails:null,ariaDisabled:Gn,ariaDropEffect:vn,ariaErrorMessage:null,ariaExpanded:Gn,ariaFlowTo:vn,ariaGrabbed:Gn,ariaHasPopup:null,ariaHidden:Gn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:vn,ariaLevel:qe,ariaLive:null,ariaModal:Gn,ariaMultiLine:Gn,ariaMultiSelectable:Gn,ariaOrientation:null,ariaOwns:vn,ariaPlaceholder:null,ariaPosInSet:qe,ariaPressed:Gn,ariaReadOnly:Gn,ariaRelevant:null,ariaRequired:Gn,ariaRoleDescription:vn,ariaRowCount:qe,ariaRowIndex:qe,ariaRowSpan:qe,ariaSelected:Gn,ariaSetSize:qe,ariaSort:null,ariaValueMax:qe,ariaValueMin:qe,ariaValueNow:qe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function R3(e,t){return t in e?e[t]:t}function D3(e,t){return R3(e,t.toLowerCase())}const FW=Ec({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$l,acceptCharset:vn,accessKey:vn,action:null,allow:null,allowFullScreen:It,allowPaymentRequest:It,allowUserMedia:It,alt:null,as:null,async:It,autoCapitalize:null,autoComplete:vn,autoFocus:It,autoPlay:It,blocking:vn,capture:null,charSet:null,checked:It,cite:null,className:vn,cols:qe,colSpan:null,content:null,contentEditable:Gn,controls:It,controlsList:vn,coords:qe|$l,crossOrigin:null,data:null,dateTime:null,decoding:null,default:It,defer:It,dir:null,dirName:null,disabled:It,download:sv,draggable:Gn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:It,formTarget:null,headers:vn,height:qe,hidden:sv,high:qe,href:null,hrefLang:null,htmlFor:vn,httpEquiv:vn,id:null,imageSizes:null,imageSrcSet:null,inert:It,inputMode:null,integrity:null,is:null,isMap:It,itemId:null,itemProp:vn,itemRef:vn,itemScope:It,itemType:vn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:It,low:qe,manifest:null,max:null,maxLength:qe,media:null,method:null,min:null,minLength:qe,multiple:It,muted:It,name:null,nonce:null,noModule:It,noValidate:It,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:It,optimum:qe,pattern:null,ping:vn,placeholder:null,playsInline:It,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:It,referrerPolicy:null,rel:vn,required:It,reversed:It,rows:qe,rowSpan:qe,sandbox:vn,scope:null,scoped:It,seamless:It,selected:It,shadowRootClonable:It,shadowRootDelegatesFocus:It,shadowRootMode:null,shape:null,size:qe,sizes:null,slot:null,span:qe,spellCheck:Gn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:qe,step:null,style:null,tabIndex:qe,target:null,title:null,translate:null,type:null,typeMustMatch:It,useMap:null,value:Gn,width:qe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:vn,axis:null,background:null,bgColor:null,border:qe,borderColor:null,bottomMargin:qe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:It,declare:It,event:null,face:null,frame:null,frameBorder:null,hSpace:qe,leftMargin:qe,link:null,longDesc:null,lowSrc:null,marginHeight:qe,marginWidth:qe,noResize:It,noHref:It,noShade:It,noWrap:It,object:null,profile:null,prompt:null,rev:null,rightMargin:qe,rules:null,scheme:null,scrolling:Gn,standby:null,summary:null,text:null,topMargin:qe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:qe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:It,disableRemotePlayback:It,prefix:null,property:null,results:qe,security:null,unselectable:null},space:"html",transform:D3}),PW=Ec({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:as,accentHeight:qe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:qe,amplitude:qe,arabicForm:null,ascent:qe,attributeName:null,attributeType:null,azimuth:qe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:qe,by:null,calcMode:null,capHeight:qe,className:vn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:qe,diffuseConstant:qe,direction:null,display:null,dur:null,divisor:qe,dominantBaseline:null,download:It,dx:null,dy:null,edgeMode:null,editable:null,elevation:qe,enableBackground:null,end:null,event:null,exponent:qe,externalResourcesRequired:null,fill:null,fillOpacity:qe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:$l,g2:$l,glyphName:$l,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:qe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:qe,horizOriginX:qe,horizOriginY:qe,id:null,ideographic:qe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:qe,k:qe,k1:qe,k2:qe,k3:qe,k4:qe,kernelMatrix:as,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:qe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:qe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:qe,overlineThickness:qe,paintOrder:null,panose1:null,path:null,pathLength:qe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:vn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:qe,pointsAtY:qe,pointsAtZ:qe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:as,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:as,rev:as,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:as,requiredFeatures:as,requiredFonts:as,requiredFormats:as,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:qe,specularExponent:qe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:qe,strikethroughThickness:qe,string:null,stroke:null,strokeDashArray:as,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:qe,strokeOpacity:qe,strokeWidth:null,style:null,surfaceScale:qe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:as,tabIndex:qe,tableValues:null,target:null,targetX:qe,targetY:qe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:as,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:qe,underlineThickness:qe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:qe,values:null,vAlphabetic:qe,vMathematical:qe,vectorEffect:null,vHanging:qe,vIdeographic:qe,version:null,vertAdvY:qe,vertOriginX:qe,vertOriginY:qe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:qe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:R3}),I3=Ec({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),j3=Ec({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:D3}),O3=Ec({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),BW={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},UW=/[A-Z]/g,mk=/-[a-z]/g,HW=/^data[-\w.:]+$/i;function $d(e,t){const n=xd(t);let s=t,a=Zr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&HW.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(mk,zW);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!mk.test(o)){let u=o.replace(UW,$W);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}a=By}return new a(s,t)}function $W(e){return"-"+e.toLowerCase()}function zW(e){return e.charAt(1).toUpperCase()}const Sc=A3([k3,FW,I3,j3,O3],"html"),Ja=A3([k3,PW,I3,j3,O3],"svg");function vd(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function wm(e){return e.join(" ").trim()}var Nl={},Gx,gk;function GW(){if(gk)return Gx;gk=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
654
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},_z="DialogDescriptionWarning",wz=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Oj(_z).contentName}}.`;return w.useEffect(()=>{const a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},dy=yj,Lj=Sj,hy=wj,Ld=Cj,Md=Nj,Fd=Aj,Pd=Rj,cm=Ij;const Mj=dy,Cz=hy,Fj=w.forwardRef(({className:e,...t},n)=>r.jsx(Ld,{className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Fj.displayName=Ld.displayName;const Nz=fc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),fy=w.forwardRef(({side:e="right",className:t,children:n,...s},a)=>r.jsxs(Cz,{children:[r.jsx(Fj,{}),r.jsxs(Md,{ref:a,className:Te(Nz({side:e}),t),...s,children:[n,r.jsxs(cm,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[r.jsx(Tr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));fy.displayName=Md.displayName;const py=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col space-y-2 text-center sm:text-left",e),...t});py.displayName="SheetHeader";const my=w.forwardRef(({className:e,...t},n)=>r.jsx(Fd,{ref:n,className:Te("text-lg font-semibold text-foreground",e),...t}));my.displayName=Fd.displayName;const Pj=w.forwardRef(({className:e,...t},n)=>r.jsx(Pd,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));Pj.displayName=Pd.displayName;function ek({className:e,...t}){return r.jsx("div",{className:Te("animate-pulse rounded-md bg-muted",e),...t})}const Tz=["top","right","bottom","left"],Mi=Math.min,ls=Math.max,yp=Math.round,If=Math.floor,aa=e=>({x:e,y:e}),Az={left:"right",right:"left",bottom:"top",top:"bottom"},kz={start:"end",end:"start"};function W0(e,t,n){return ls(e,Mi(t,n))}function Wa(e,t){return typeof e=="function"?e(t):e}function Va(e){return e.split("-")[0]}function gc(e){return e.split("-")[1]}function gy(e){return e==="x"?"y":"x"}function by(e){return e==="y"?"height":"width"}const Rz=new Set(["top","bottom"]);function na(e){return Rz.has(Va(e))?"y":"x"}function xy(e){return gy(na(e))}function Dz(e,t,n){n===void 0&&(n=!1);const s=gc(e),a=xy(e),o=by(a);let u=a==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(u=Ep(u)),[u,Ep(u)]}function Iz(e){const t=Ep(e);return[V0(e),t,V0(t)]}function V0(e){return e.replace(/start|end/g,t=>kz[t])}const tk=["left","right"],nk=["right","left"],jz=["top","bottom"],Oz=["bottom","top"];function Lz(e,t,n){switch(e){case"top":case"bottom":return n?t?nk:tk:t?tk:nk;case"left":case"right":return t?jz:Oz;default:return[]}}function Mz(e,t,n,s){const a=gc(e);let o=Lz(Va(e),n==="start",s);return a&&(o=o.map(u=>u+"-"+a),t&&(o=o.concat(o.map(V0)))),o}function Ep(e){return e.replace(/left|right|bottom|top/g,t=>Az[t])}function Fz(e){return{top:0,right:0,bottom:0,left:0,...e}}function Bj(e){return typeof e!="number"?Fz(e):{top:e,right:e,bottom:e,left:e}}function Sp(e){const{x:t,y:n,width:s,height:a}=e;return{width:s,height:a,top:n,left:t,right:t+s,bottom:n+a,x:t,y:n}}function rk(e,t,n){let{reference:s,floating:a}=e;const o=na(t),u=xy(t),c=by(u),d=Va(t),h=o==="y",p=s.x+s.width/2-a.width/2,m=s.y+s.height/2-a.height/2,g=s[c]/2-a[c]/2;let v;switch(d){case"top":v={x:p,y:s.y-a.height};break;case"bottom":v={x:p,y:s.y+s.height};break;case"right":v={x:s.x+s.width,y:m};break;case"left":v={x:s.x-a.width,y:m};break;default:v={x:s.x,y:s.y}}switch(gc(t)){case"start":v[u]-=g*(n&&h?-1:1);break;case"end":v[u]+=g*(n&&h?-1:1);break}return v}const Pz=async(e,t,n)=>{const{placement:s="bottom",strategy:a="absolute",middleware:o=[],platform:u}=n,c=o.filter(Boolean),d=await(u.isRTL==null?void 0:u.isRTL(t));let h=await u.getElementRects({reference:e,floating:t,strategy:a}),{x:p,y:m}=rk(h,s,d),g=s,v={},C=0;for(let S=0;S<c.length;S++){const{name:b,fn:y}=c[S],{x:E,y:_,data:N,reset:A}=await y({x:p,y:m,initialPlacement:s,placement:g,strategy:a,middlewareData:v,rects:h,platform:u,elements:{reference:e,floating:t}});p=E??p,m=_??m,v={...v,[b]:{...v[b],...N}},A&&C<=50&&(C++,typeof A=="object"&&(A.placement&&(g=A.placement),A.rects&&(h=A.rects===!0?await u.getElementRects({reference:e,floating:t,strategy:a}):A.rects),{x:p,y:m}=rk(h,g,d)),S=-1)}return{x:p,y:m,placement:g,strategy:a,middlewareData:v}};async function pd(e,t){var n;t===void 0&&(t={});const{x:s,y:a,platform:o,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:g=!1,padding:v=0}=Wa(t,e),C=Bj(v),b=c[g?m==="floating"?"reference":"floating":m],y=Sp(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:d})),E=m==="floating"?{x:s,y:a,width:u.floating.width,height:u.floating.height}:u.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),N=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},A=Sp(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:E,offsetParent:_,strategy:d}):E);return{top:(y.top-A.top+C.top)/N.y,bottom:(A.bottom-y.bottom+C.bottom)/N.y,left:(y.left-A.left+C.left)/N.x,right:(A.right-y.right+C.right)/N.x}}const Bz=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:a,rects:o,platform:u,elements:c,middlewareData:d}=t,{element:h,padding:p=0}=Wa(e,t)||{};if(h==null)return{};const m=Bj(p),g={x:n,y:s},v=xy(a),C=by(v),S=await u.getDimensions(h),b=v==="y",y=b?"top":"left",E=b?"bottom":"right",_=b?"clientHeight":"clientWidth",N=o.reference[C]+o.reference[v]-g[v]-o.floating[C],A=g[v]-o.reference[v],k=await(u.getOffsetParent==null?void 0:u.getOffsetParent(h));let I=k?k[_]:0;(!I||!await(u.isElement==null?void 0:u.isElement(k)))&&(I=c.floating[_]||o.floating[C]);const R=N/2-A/2,M=I/2-S[C]/2-1,L=Mi(m[y],M),$=Mi(m[E],M),H=L,B=I-S[C]-$,z=I/2-S[C]/2+R,Q=W0(H,z,B),P=!d.arrow&&gc(a)!=null&&z!==Q&&o.reference[C]/2-(z<H?L:$)-S[C]/2<0,X=P?z<H?z-H:z-B:0;return{[v]:g[v]+X,data:{[v]:Q,centerOffset:z-Q-X,...P&&{alignmentOffset:X}},reset:P}}}),Uz=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:a,middlewareData:o,rects:u,initialPlacement:c,platform:d,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:S=!0,...b}=Wa(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=Va(a),E=na(c),_=Va(c)===c,N=await(d.isRTL==null?void 0:d.isRTL(h.floating)),A=g||(_||!S?[Ep(c)]:Iz(c)),k=C!=="none";!g&&k&&A.push(...Mz(c,S,C,N));const I=[c,...A],R=await pd(t,b),M=[];let L=((s=o.flip)==null?void 0:s.overflows)||[];if(p&&M.push(R[y]),m){const z=Dz(a,u,N);M.push(R[z[0]],R[z[1]])}if(L=[...L,{placement:a,overflows:M}],!M.every(z=>z<=0)){var $,H;const z=((($=o.flip)==null?void 0:$.index)||0)+1,Q=I[z];if(Q&&(!(m==="alignment"?E!==na(Q):!1)||L.every(Y=>na(Y.placement)===E?Y.overflows[0]>0:!0)))return{data:{index:z,overflows:L},reset:{placement:Q}};let P=(H=L.filter(X=>X.overflows[0]<=0).sort((X,Y)=>X.overflows[1]-Y.overflows[1])[0])==null?void 0:H.placement;if(!P)switch(v){case"bestFit":{var B;const X=(B=L.filter(Y=>{if(k){const F=na(Y.placement);return F===E||F==="y"}return!0}).map(Y=>[Y.placement,Y.overflows.filter(F=>F>0).reduce((F,O)=>F+O,0)]).sort((Y,F)=>Y[1]-F[1])[0])==null?void 0:B[0];X&&(P=X);break}case"initialPlacement":P=c;break}if(a!==P)return{reset:{placement:P}}}return{}}}};function sk(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ak(e){return Tz.some(t=>e[t]>=0)}const Hz=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:s="referenceHidden",...a}=Wa(e,t);switch(s){case"referenceHidden":{const o=await pd(t,{...a,elementContext:"reference"}),u=sk(o,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:ak(u)}}}case"escaped":{const o=await pd(t,{...a,altBoundary:!0}),u=sk(o,n.floating);return{data:{escapedOffsets:u,escaped:ak(u)}}}default:return{}}}}},Uj=new Set(["left","top"]);async function $z(e,t){const{placement:n,platform:s,elements:a}=e,o=await(s.isRTL==null?void 0:s.isRTL(a.floating)),u=Va(n),c=gc(n),d=na(n)==="y",h=Uj.has(u)?-1:1,p=o&&d?-1:1,m=Wa(t,e);let{mainAxis:g,crossAxis:v,alignmentAxis:C}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof C=="number"&&(v=c==="end"?C*-1:C),d?{x:v*p,y:g*h}:{x:g*h,y:v*p}}const zz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:a,y:o,placement:u,middlewareData:c}=t,d=await $z(t,e);return u===((n=c.offset)==null?void 0:n.placement)&&(s=c.arrow)!=null&&s.alignmentOffset?{}:{x:a+d.x,y:o+d.y,data:{...d,placement:u}}}}},Gz=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:a}=t,{mainAxis:o=!0,crossAxis:u=!1,limiter:c={fn:b=>{let{x:y,y:E}=b;return{x:y,y:E}}},...d}=Wa(e,t),h={x:n,y:s},p=await pd(t,d),m=na(Va(a)),g=gy(m);let v=h[g],C=h[m];if(o){const b=g==="y"?"top":"left",y=g==="y"?"bottom":"right",E=v+p[b],_=v-p[y];v=W0(E,v,_)}if(u){const b=m==="y"?"top":"left",y=m==="y"?"bottom":"right",E=C+p[b],_=C-p[y];C=W0(E,C,_)}const S=c.fn({...t,[g]:v,[m]:C});return{...S,data:{x:S.x-n,y:S.y-s,enabled:{[g]:o,[m]:u}}}}}},qz=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:a,rects:o,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=Wa(e,t),p={x:n,y:s},m=na(a),g=gy(m);let v=p[g],C=p[m];const S=Wa(c,t),b=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const _=g==="y"?"height":"width",N=o.reference[g]-o.floating[_]+b.mainAxis,A=o.reference[g]+o.reference[_]-b.mainAxis;v<N?v=N:v>A&&(v=A)}if(h){var y,E;const _=g==="y"?"width":"height",N=Uj.has(Va(a)),A=o.reference[m]-o.floating[_]+(N&&((y=u.offset)==null?void 0:y[m])||0)+(N?0:b.crossAxis),k=o.reference[m]+o.reference[_]+(N?0:((E=u.offset)==null?void 0:E[m])||0)-(N?b.crossAxis:0);C<A?C=A:C>k&&(C=k)}return{[g]:v,[m]:C}}}},Wz=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:a,rects:o,platform:u,elements:c}=t,{apply:d=()=>{},...h}=Wa(e,t),p=await pd(t,h),m=Va(a),g=gc(a),v=na(a)==="y",{width:C,height:S}=o.floating;let b,y;m==="top"||m==="bottom"?(b=m,y=g===(await(u.isRTL==null?void 0:u.isRTL(c.floating))?"start":"end")?"left":"right"):(y=m,b=g==="end"?"top":"bottom");const E=S-p.top-p.bottom,_=C-p.left-p.right,N=Mi(S-p[b],E),A=Mi(C-p[y],_),k=!t.middlewareData.shift;let I=N,R=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=_),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(I=E),k&&!g){const L=ls(p.left,0),$=ls(p.right,0),H=ls(p.top,0),B=ls(p.bottom,0);v?R=C-2*(L!==0||$!==0?L+$:ls(p.left,p.right)):I=S-2*(H!==0||B!==0?H+B:ls(p.top,p.bottom))}await d({...t,availableWidth:R,availableHeight:I});const M=await u.getDimensions(c.floating);return C!==M.width||S!==M.height?{reset:{rects:!0}}:{}}}};function um(){return typeof window<"u"}function bc(e){return Hj(e)?(e.nodeName||"").toLowerCase():"#document"}function us(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ca(e){var t;return(t=(Hj(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Hj(e){return um()?e instanceof Node||e instanceof us(e).Node:!1}function Ps(e){return um()?e instanceof Element||e instanceof us(e).Element:!1}function oa(e){return um()?e instanceof HTMLElement||e instanceof us(e).HTMLElement:!1}function ik(e){return!um()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof us(e).ShadowRoot}const Vz=new Set(["inline","contents"]);function Bd(e){const{overflow:t,overflowX:n,overflowY:s,display:a}=Bs(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!Vz.has(a)}const Yz=new Set(["table","td","th"]);function Kz(e){return Yz.has(bc(e))}const Xz=[":popover-open",":modal"];function dm(e){return Xz.some(t=>{try{return e.matches(t)}catch{return!1}})}const Zz=["transform","translate","scale","rotate","perspective"],Qz=["transform","translate","scale","rotate","perspective","filter"],Jz=["paint","layout","strict","content"];function vy(e){const t=yy(),n=Ps(e)?Bs(e):e;return Zz.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Qz.some(s=>(n.willChange||"").includes(s))||Jz.some(s=>(n.contain||"").includes(s))}function eG(e){let t=Fi(e);for(;oa(t)&&!Zl(t);){if(vy(t))return t;if(dm(t))return null;t=Fi(t)}return null}function yy(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const tG=new Set(["html","body","#document"]);function Zl(e){return tG.has(bc(e))}function Bs(e){return us(e).getComputedStyle(e)}function hm(e){return Ps(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Fi(e){if(bc(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ik(e)&&e.host||ca(e);return ik(t)?t.host:t}function $j(e){const t=Fi(e);return Zl(t)?e.ownerDocument?e.ownerDocument.body:e.body:oa(t)&&Bd(t)?t:$j(t)}function md(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=$j(e),o=a===((s=e.ownerDocument)==null?void 0:s.body),u=us(a);if(o){const c=Y0(u);return t.concat(u,u.visualViewport||[],Bd(a)?a:[],c&&n?md(c):[])}return t.concat(a,md(a,[],n))}function Y0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zj(e){const t=Bs(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const a=oa(e),o=a?e.offsetWidth:n,u=a?e.offsetHeight:s,c=yp(n)!==o||yp(s)!==u;return c&&(n=o,s=u),{width:n,height:s,$:c}}function Ey(e){return Ps(e)?e:e.contextElement}function Hl(e){const t=Ey(e);if(!oa(t))return aa(1);const n=t.getBoundingClientRect(),{width:s,height:a,$:o}=zj(t);let u=(o?yp(n.width):n.width)/s,c=(o?yp(n.height):n.height)/a;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const nG=aa(0);function Gj(e){const t=us(e);return!yy()||!t.visualViewport?nG:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function rG(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==us(e)?!1:t}function So(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=Ey(e);let u=aa(1);t&&(s?Ps(s)&&(u=Hl(s)):u=Hl(e));const c=rG(o,n,s)?Gj(o):aa(0);let d=(a.left+c.x)/u.x,h=(a.top+c.y)/u.y,p=a.width/u.x,m=a.height/u.y;if(o){const g=us(o),v=s&&Ps(s)?us(s):s;let C=g,S=Y0(C);for(;S&&s&&v!==C;){const b=Hl(S),y=S.getBoundingClientRect(),E=Bs(S),_=y.left+(S.clientLeft+parseFloat(E.paddingLeft))*b.x,N=y.top+(S.clientTop+parseFloat(E.paddingTop))*b.y;d*=b.x,h*=b.y,p*=b.x,m*=b.y,d+=_,h+=N,C=us(S),S=Y0(C)}}return Sp({width:p,height:m,x:d,y:h})}function Sy(e,t){const n=hm(e).scrollLeft;return t?t.left+n:So(ca(e)).left+n}function qj(e,t,n){n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=s.left+t.scrollLeft-(n?0:Sy(e,s)),o=s.top+t.scrollTop;return{x:a,y:o}}function sG(e){let{elements:t,rect:n,offsetParent:s,strategy:a}=e;const o=a==="fixed",u=ca(s),c=t?dm(t.floating):!1;if(s===u||c&&o)return n;let d={scrollLeft:0,scrollTop:0},h=aa(1);const p=aa(0),m=oa(s);if((m||!m&&!o)&&((bc(s)!=="body"||Bd(u))&&(d=hm(s)),oa(s))){const v=So(s);h=Hl(s),p.x=v.x+s.clientLeft,p.y=v.y+s.clientTop}const g=u&&!m&&!o?qj(u,d,!0):aa(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+p.x+g.x,y:n.y*h.y-d.scrollTop*h.y+p.y+g.y}}function aG(e){return Array.from(e.getClientRects())}function iG(e){const t=ca(e),n=hm(e),s=e.ownerDocument.body,a=ls(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=ls(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let u=-n.scrollLeft+Sy(e);const c=-n.scrollTop;return Bs(s).direction==="rtl"&&(u+=ls(t.clientWidth,s.clientWidth)-a),{width:a,height:o,x:u,y:c}}function oG(e,t){const n=us(e),s=ca(e),a=n.visualViewport;let o=s.clientWidth,u=s.clientHeight,c=0,d=0;if(a){o=a.width,u=a.height;const h=yy();(!h||h&&t==="fixed")&&(c=a.offsetLeft,d=a.offsetTop)}return{width:o,height:u,x:c,y:d}}const lG=new Set(["absolute","fixed"]);function cG(e,t){const n=So(e,!0,t==="fixed"),s=n.top+e.clientTop,a=n.left+e.clientLeft,o=oa(e)?Hl(e):aa(1),u=e.clientWidth*o.x,c=e.clientHeight*o.y,d=a*o.x,h=s*o.y;return{width:u,height:c,x:d,y:h}}function ok(e,t,n){let s;if(t==="viewport")s=oG(e,n);else if(t==="document")s=iG(ca(e));else if(Ps(t))s=cG(t,n);else{const a=Gj(e);s={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Sp(s)}function Wj(e,t){const n=Fi(e);return n===t||!Ps(n)||Zl(n)?!1:Bs(n).position==="fixed"||Wj(n,t)}function uG(e,t){const n=t.get(e);if(n)return n;let s=md(e,[],!1).filter(c=>Ps(c)&&bc(c)!=="body"),a=null;const o=Bs(e).position==="fixed";let u=o?Fi(e):e;for(;Ps(u)&&!Zl(u);){const c=Bs(u),d=vy(u);!d&&c.position==="fixed"&&(a=null),(o?!d&&!a:!d&&c.position==="static"&&!!a&&lG.has(a.position)||Bd(u)&&!d&&Wj(e,u))?s=s.filter(p=>p!==u):a=c,u=Fi(u)}return t.set(e,s),s}function dG(e){let{element:t,boundary:n,rootBoundary:s,strategy:a}=e;const u=[...n==="clippingAncestors"?dm(t)?[]:uG(t,this._c):[].concat(n),s],c=u[0],d=u.reduce((h,p)=>{const m=ok(t,p,a);return h.top=ls(m.top,h.top),h.right=Mi(m.right,h.right),h.bottom=Mi(m.bottom,h.bottom),h.left=ls(m.left,h.left),h},ok(t,c,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function hG(e){const{width:t,height:n}=zj(e);return{width:t,height:n}}function fG(e,t,n){const s=oa(t),a=ca(t),o=n==="fixed",u=So(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const d=aa(0);function h(){d.x=Sy(a)}if(s||!s&&!o)if((bc(t)!=="body"||Bd(a))&&(c=hm(t)),s){const v=So(t,!0,o,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else a&&h();o&&!s&&a&&h();const p=a&&!s&&!o?qj(a,c):aa(0),m=u.left+c.scrollLeft-d.x-p.x,g=u.top+c.scrollTop-d.y-p.y;return{x:m,y:g,width:u.width,height:u.height}}function Hx(e){return Bs(e).position==="static"}function lk(e,t){if(!oa(e)||Bs(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ca(e)===n&&(n=n.ownerDocument.body),n}function Vj(e,t){const n=us(e);if(dm(e))return n;if(!oa(e)){let a=Fi(e);for(;a&&!Zl(a);){if(Ps(a)&&!Hx(a))return a;a=Fi(a)}return n}let s=lk(e,t);for(;s&&Kz(s)&&Hx(s);)s=lk(s,t);return s&&Zl(s)&&Hx(s)&&!vy(s)?n:s||eG(e)||n}const pG=async function(e){const t=this.getOffsetParent||Vj,n=this.getDimensions,s=await n(e.floating);return{reference:fG(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function mG(e){return Bs(e).direction==="rtl"}const gG={convertOffsetParentRelativeRectToViewportRelativeRect:sG,getDocumentElement:ca,getClippingRect:dG,getOffsetParent:Vj,getElementRects:pG,getClientRects:aG,getDimensions:hG,getScale:Hl,isElement:Ps,isRTL:mG};function Yj(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function bG(e,t){let n=null,s;const a=ca(e);function o(){var c;clearTimeout(s),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),o();const h=e.getBoundingClientRect(),{left:p,top:m,width:g,height:v}=h;if(c||t(),!g||!v)return;const C=If(m),S=If(a.clientWidth-(p+g)),b=If(a.clientHeight-(m+v)),y=If(p),_={rootMargin:-C+"px "+-S+"px "+-b+"px "+-y+"px",threshold:ls(0,Mi(1,d))||1};let N=!0;function A(k){const I=k[0].intersectionRatio;if(I!==d){if(!N)return u();I?u(!1,I):s=setTimeout(()=>{u(!1,1e-7)},1e3)}I===1&&!Yj(h,e.getBoundingClientRect())&&u(),N=!1}try{n=new IntersectionObserver(A,{..._,root:a.ownerDocument})}catch{n=new IntersectionObserver(A,_)}n.observe(e)}return u(!0),o}function xG(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=s,h=Ey(e),p=a||o?[...h?md(h):[],...md(t)]:[];p.forEach(y=>{a&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const m=h&&c?bG(h,n):null;let g=-1,v=null;u&&(v=new ResizeObserver(y=>{let[E]=y;E&&E.target===h&&v&&(v.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var _;(_=v)==null||_.observe(t)})),n()}),h&&!d&&v.observe(h),v.observe(t));let C,S=d?So(e):null;d&&b();function b(){const y=So(e);S&&!Yj(S,y)&&n(),S=y,C=requestAnimationFrame(b)}return n(),()=>{var y;p.forEach(E=>{a&&E.removeEventListener("scroll",n),o&&E.removeEventListener("resize",n)}),m?.(),(y=v)==null||y.disconnect(),v=null,d&&cancelAnimationFrame(C)}}const vG=zz,yG=Gz,EG=Uz,SG=Wz,_G=Hz,ck=Bz,wG=qz,CG=(e,t,n)=>{const s=new Map,a={platform:gG,...n},o={...a.platform,_c:s};return Pz(e,t,{...a,platform:o})};var NG=typeof document<"u",TG=function(){},np=NG?w.useLayoutEffect:TG;function _p(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!_p(e[s],t[s]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,a[s]))return!1;for(s=n;s--!==0;){const o=a[s];if(!(o==="_owner"&&e.$$typeof)&&!_p(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Kj(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function uk(e,t){const n=Kj(e);return Math.round(t*n)/n}function $x(e){const t=w.useRef(e);return np(()=>{t.current=e}),t}function AG(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:a,elements:{reference:o,floating:u}={},transform:c=!0,whileElementsMounted:d,open:h}=e,[p,m]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,v]=w.useState(s);_p(g,s)||v(s);const[C,S]=w.useState(null),[b,y]=w.useState(null),E=w.useCallback(Y=>{Y!==k.current&&(k.current=Y,S(Y))},[]),_=w.useCallback(Y=>{Y!==I.current&&(I.current=Y,y(Y))},[]),N=o||C,A=u||b,k=w.useRef(null),I=w.useRef(null),R=w.useRef(p),M=d!=null,L=$x(d),$=$x(a),H=$x(h),B=w.useCallback(()=>{if(!k.current||!I.current)return;const Y={placement:t,strategy:n,middleware:g};$.current&&(Y.platform=$.current),CG(k.current,I.current,Y).then(F=>{const O={...F,isPositioned:H.current!==!1};z.current&&!_p(R.current,O)&&(R.current=O,cc.flushSync(()=>{m(O)}))})},[g,t,n,$,H]);np(()=>{h===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,m(Y=>({...Y,isPositioned:!1})))},[h]);const z=w.useRef(!1);np(()=>(z.current=!0,()=>{z.current=!1}),[]),np(()=>{if(N&&(k.current=N),A&&(I.current=A),N&&A){if(L.current)return L.current(N,A,B);B()}},[N,A,B,L,M]);const Q=w.useMemo(()=>({reference:k,floating:I,setReference:E,setFloating:_}),[E,_]),P=w.useMemo(()=>({reference:N,floating:A}),[N,A]),X=w.useMemo(()=>{const Y={position:n,left:0,top:0};if(!P.floating)return Y;const F=uk(P.floating,p.x),O=uk(P.floating,p.y);return c?{...Y,transform:"translate("+F+"px, "+O+"px)",...Kj(P.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:O}},[n,c,P.floating,p.x,p.y]);return w.useMemo(()=>({...p,update:B,refs:Q,elements:P,floatingStyles:X}),[p,B,Q,P,X])}const kG=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:a}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?ck({element:s.current,padding:a}).fn(n):{}:s?ck({element:s,padding:a}).fn(n):{}}}},RG=(e,t)=>({...vG(e),options:[e,t]}),DG=(e,t)=>({...yG(e),options:[e,t]}),IG=(e,t)=>({...wG(e),options:[e,t]}),jG=(e,t)=>({...EG(e),options:[e,t]}),OG=(e,t)=>({...SG(e),options:[e,t]}),LG=(e,t)=>({..._G(e),options:[e,t]}),MG=(e,t)=>({...kG(e),options:[e,t]});var FG="Arrow",Xj=w.forwardRef((e,t)=>{const{children:n,width:s=10,height:a=5,...o}=e;return r.jsx(ht.svg,{...o,ref:t,width:s,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:r.jsx("polygon",{points:"0,0 30,0 15,10"})})});Xj.displayName=FG;var PG=Xj;function _y(e){const[t,n]=w.useState(void 0);return cr(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const o=a[0];let u,c;if("borderBoxSize"in o){const d=o.borderBoxSize,h=Array.isArray(d)?d[0]:d;u=h.inlineSize,c=h.blockSize}else u=e.offsetWidth,c=e.offsetHeight;n({width:u,height:c})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var wy="Popper",[Zj,xc]=Fr(wy),[BG,Qj]=Zj(wy),Jj=e=>{const{__scopePopper:t,children:n}=e,[s,a]=w.useState(null);return r.jsx(BG,{scope:t,anchor:s,onAnchorChange:a,children:n})};Jj.displayName=wy;var eO="PopperAnchor",tO=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...a}=e,o=Qj(eO,n),u=w.useRef(null),c=Tt(t,u),d=w.useRef(null);return w.useEffect(()=>{const h=d.current;d.current=s?.current||u.current,h!==d.current&&o.onAnchorChange(d.current)}),s?null:r.jsx(ht.div,{...a,ref:c})});tO.displayName=eO;var Cy="PopperContent",[UG,HG]=Zj(Cy),nO=w.forwardRef((e,t)=>{const{__scopePopper:n,side:s="bottom",sideOffset:a=0,align:o="center",alignOffset:u=0,arrowPadding:c=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:g=!1,updatePositionStrategy:v="optimized",onPlaced:C,...S}=e,b=Qj(Cy,n),[y,E]=w.useState(null),_=Tt(t,K=>E(K)),[N,A]=w.useState(null),k=_y(N),I=k?.width??0,R=k?.height??0,M=s+(o!=="center"?"-"+o:""),L=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},$=Array.isArray(h)?h:[h],H=$.length>0,B={padding:L,boundary:$.filter(zG),altBoundary:H},{refs:z,floatingStyles:Q,placement:P,isPositioned:X,middlewareData:Y}=AG({strategy:"fixed",placement:M,whileElementsMounted:(...K)=>xG(...K,{animationFrame:v==="always"}),elements:{reference:b.anchor},middleware:[RG({mainAxis:a+R,alignmentAxis:u}),d&&DG({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?IG():void 0,...B}),d&&jG({...B}),OG({...B,apply:({elements:K,rects:G,availableWidth:Z,availableHeight:ce})=>{const{width:le,height:ne}=G.reference,pe=K.floating.style;pe.setProperty("--radix-popper-available-width",`${Z}px`),pe.setProperty("--radix-popper-available-height",`${ce}px`),pe.setProperty("--radix-popper-anchor-width",`${le}px`),pe.setProperty("--radix-popper-anchor-height",`${ne}px`)}}),N&&MG({element:N,padding:c}),GG({arrowWidth:I,arrowHeight:R}),g&&LG({strategy:"referenceHidden",...B})]}),[F,O]=aO(P),V=Pn(C);cr(()=>{X&&V?.()},[X,V]);const te=Y.arrow?.x,U=Y.arrow?.y,W=Y.arrow?.centerOffset!==0,[ae,se]=w.useState();return cr(()=>{y&&se(window.getComputedStyle(y).zIndex)},[y]),r.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...Q,transform:X?Q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ae,"--radix-popper-transform-origin":[Y.transformOrigin?.x,Y.transformOrigin?.y].join(" "),...Y.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:r.jsx(UG,{scope:n,placedSide:F,onArrowChange:A,arrowX:te,arrowY:U,shouldHideArrow:W,children:r.jsx(ht.div,{"data-side":F,"data-align":O,...S,ref:_,style:{...S.style,animation:X?void 0:"none"}})})})});nO.displayName=Cy;var rO="PopperArrow",$G={top:"bottom",right:"left",bottom:"top",left:"right"},sO=w.forwardRef(function(t,n){const{__scopePopper:s,...a}=t,o=HG(rO,s),u=$G[o.placedSide];return r.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:r.jsx(PG,{...a,ref:n,style:{...a.style,display:"block"}})})});sO.displayName=rO;function zG(e){return e!==null}var GG=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:s,middlewareData:a}=t,u=a.arrow?.centerOffset!==0,c=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[h,p]=aO(n),m={start:"0%",center:"50%",end:"100%"}[p],g=(a.arrow?.x??0)+c/2,v=(a.arrow?.y??0)+d/2;let C="",S="";return h==="bottom"?(C=u?m:`${g}px`,S=`${-d}px`):h==="top"?(C=u?m:`${g}px`,S=`${s.floating.height+d}px`):h==="right"?(C=`${-d}px`,S=u?m:`${v}px`):h==="left"&&(C=`${s.floating.width+d}px`,S=u?m:`${v}px`),{data:{x:C,y:S}}}});function aO(e){const[t,n="center"]=e.split("-");return[t,n]}var Ny=Jj,Ty=tO,Ay=nO,ky=sO,[fm,zde]=Fr("Tooltip",[xc]),pm=xc(),iO="TooltipProvider",qG=700,K0="tooltip.open",[WG,Ry]=fm(iO),oO=e=>{const{__scopeTooltip:t,delayDuration:n=qG,skipDelayDuration:s=300,disableHoverableContent:a=!1,children:o}=e,u=w.useRef(!0),c=w.useRef(!1),d=w.useRef(0);return w.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),r.jsx(WG,{scope:t,isOpenDelayedRef:u,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(d.current),u.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u.current=!0,s)},[s]),isPointerInTransitRef:c,onPointerInTransitChange:w.useCallback(h=>{c.current=h},[]),disableHoverableContent:a,children:o})};oO.displayName=iO;var gd="Tooltip",[VG,mm]=fm(gd),lO=e=>{const{__scopeTooltip:t,children:n,open:s,defaultOpen:a,onOpenChange:o,disableHoverableContent:u,delayDuration:c}=e,d=Ry(gd,e.__scopeTooltip),h=pm(t),[p,m]=w.useState(null),g=Ms(),v=w.useRef(0),C=u??d.disableHoverableContent,S=c??d.delayDuration,b=w.useRef(!1),[y,E]=ia({prop:s,defaultProp:a??!1,onChange:I=>{I?(d.onOpen(),document.dispatchEvent(new CustomEvent(K0))):d.onClose(),o?.(I)},caller:gd}),_=w.useMemo(()=>y?b.current?"delayed-open":"instant-open":"closed",[y]),N=w.useCallback(()=>{window.clearTimeout(v.current),v.current=0,b.current=!1,E(!0)},[E]),A=w.useCallback(()=>{window.clearTimeout(v.current),v.current=0,E(!1)},[E]),k=w.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{b.current=!0,E(!0),v.current=0},S)},[S,E]);return w.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),r.jsx(Ny,{...h,children:r.jsx(VG,{scope:t,contentId:g,open:y,stateAttribute:_,trigger:p,onTriggerChange:m,onTriggerEnter:w.useCallback(()=>{d.isOpenDelayedRef.current?k():N()},[d.isOpenDelayedRef,k,N]),onTriggerLeave:w.useCallback(()=>{C?A():(window.clearTimeout(v.current),v.current=0)},[A,C]),onOpen:N,onClose:A,disableHoverableContent:C,children:n})})};lO.displayName=gd;var X0="TooltipTrigger",cO=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,a=mm(X0,n),o=Ry(X0,n),u=pm(n),c=w.useRef(null),d=Tt(t,c,a.onTriggerChange),h=w.useRef(!1),p=w.useRef(!1),m=w.useCallback(()=>h.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),r.jsx(Ty,{asChild:!0,...u,children:r.jsx(ht.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...s,ref:d,onPointerMove:Ve(e.onPointerMove,g=>{g.pointerType!=="touch"&&!p.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),p.current=!0)}),onPointerLeave:Ve(e.onPointerLeave,()=>{a.onTriggerLeave(),p.current=!1}),onPointerDown:Ve(e.onPointerDown,()=>{a.open&&a.onClose(),h.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:Ve(e.onFocus,()=>{h.current||a.onOpen()}),onBlur:Ve(e.onBlur,a.onClose),onClick:Ve(e.onClick,a.onClose)})})});cO.displayName=X0;var YG="TooltipPortal",[Gde,KG]=fm(YG,{forceMount:void 0}),Ql="TooltipContent",uO=w.forwardRef((e,t)=>{const n=KG(Ql,e.__scopeTooltip),{forceMount:s=n.forceMount,side:a="top",...o}=e,u=mm(Ql,e.__scopeTooltip);return r.jsx(xr,{present:s||u.open,children:u.disableHoverableContent?r.jsx(dO,{side:a,...o,ref:t}):r.jsx(XG,{side:a,...o,ref:t})})}),XG=w.forwardRef((e,t)=>{const n=mm(Ql,e.__scopeTooltip),s=Ry(Ql,e.__scopeTooltip),a=w.useRef(null),o=Tt(t,a),[u,c]=w.useState(null),{trigger:d,onClose:h}=n,p=a.current,{onPointerInTransitChange:m}=s,g=w.useCallback(()=>{c(null),m(!1)},[m]),v=w.useCallback((C,S)=>{const b=C.currentTarget,y={x:C.clientX,y:C.clientY},E=tq(y,b.getBoundingClientRect()),_=nq(y,E),N=rq(S.getBoundingClientRect()),A=aq([..._,...N]);c(A),m(!0)},[m]);return w.useEffect(()=>()=>g(),[g]),w.useEffect(()=>{if(d&&p){const C=b=>v(b,p),S=b=>v(b,d);return d.addEventListener("pointerleave",C),p.addEventListener("pointerleave",S),()=>{d.removeEventListener("pointerleave",C),p.removeEventListener("pointerleave",S)}}},[d,p,v,g]),w.useEffect(()=>{if(u){const C=S=>{const b=S.target,y={x:S.clientX,y:S.clientY},E=d?.contains(b)||p?.contains(b),_=!sq(y,u);E?g():_&&(g(),h())};return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[d,p,u,h,g]),r.jsx(dO,{...e,ref:o})}),[ZG,QG]=fm(gd,{isInside:!1}),JG=iI("TooltipContent"),dO=w.forwardRef((e,t)=>{const{__scopeTooltip:n,children:s,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:u,...c}=e,d=mm(Ql,n),h=pm(n),{onClose:p}=d;return w.useEffect(()=>(document.addEventListener(K0,p),()=>document.removeEventListener(K0,p)),[p]),w.useEffect(()=>{if(d.trigger){const m=g=>{g.target?.contains(d.trigger)&&p()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[d.trigger,p]),r.jsx(hc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:m=>m.preventDefault(),onDismiss:p,children:r.jsxs(Ay,{"data-state":d.stateAttribute,...h,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[r.jsx(JG,{children:s}),r.jsx(ZG,{scope:n,isInside:!0,children:r.jsx(j7,{id:d.contentId,role:"tooltip",children:a||s})})]})})});uO.displayName=Ql;var hO="TooltipArrow",eq=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...s}=e,a=pm(n);return QG(hO,n).isInside?null:r.jsx(ky,{...a,...s,ref:t})});eq.displayName=hO;function tq(e,t){const n=Math.abs(t.top-e.y),s=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,s,a,o)){case o:return"left";case a:return"right";case n:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function nq(e,t,n=5){const s=[];switch(t){case"top":s.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":s.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":s.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":s.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return s}function rq(e){const{top:t,right:n,bottom:s,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:s},{x:a,y:s}]}function sq(e,t){const{x:n,y:s}=e;let a=!1;for(let o=0,u=t.length-1;o<t.length;u=o++){const c=t[o],d=t[u],h=c.x,p=c.y,m=d.x,g=d.y;p>s!=g>s&&n<(m-h)*(s-p)/(g-p)+h&&(a=!a)}return a}function aq(e){const t=e.slice();return t.sort((n,s)=>n.x<s.x?-1:n.x>s.x?1:n.y<s.y?-1:n.y>s.y?1:0),iq(t)}function iq(e){if(e.length<=1)return e.slice();const t=[];for(let s=0;s<e.length;s++){const a=e[s];for(;t.length>=2;){const o=t[t.length-1],u=t[t.length-2];if((o.x-u.x)*(a.y-u.y)>=(o.y-u.y)*(a.x-u.x))t.pop();else break}t.push(a)}t.pop();const n=[];for(let s=e.length-1;s>=0;s--){const a=e[s];for(;n.length>=2;){const o=n[n.length-1],u=n[n.length-2];if((o.x-u.x)*(a.y-u.y)>=(o.y-u.y)*(a.x-u.x))n.pop();else break}n.push(a)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var oq=oO,lq=lO,cq=cO,fO=uO;const uq=oq,dq=lq,hq=cq,pO=w.forwardRef(({className:e,sideOffset:t=4,...n},s)=>r.jsx(fO,{ref:s,sideOffset:t,className:Te("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));pO.displayName=fO.displayName;const fq="sidebar_state",pq=3600*24*7,mq="16rem",gq="18rem",bq="3rem",xq="b",mO=w.createContext(null);function gm(){const e=w.useContext(mO);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const gO=w.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:s,style:a,children:o,...u},c)=>{const d=ij(),[h,p]=w.useState(!1),[m,g]=w.useState(e),v=t??m,C=w.useCallback(E=>{const _=typeof E=="function"?E(v):E;n?n(_):g(_),document.cookie=`${fq}=${_}; path=/; max-age=${pq}`},[n,v]),S=w.useCallback(()=>d?p(E=>!E):C(E=>!E),[d,C,p]);w.useEffect(()=>{const E=_=>{_.key===xq&&(_.metaKey||_.ctrlKey)&&(_.preventDefault(),S())};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[S]);const b=v?"expanded":"collapsed",y=w.useMemo(()=>({state:b,open:v,setOpen:C,isMobile:d,openMobile:h,setOpenMobile:p,toggleSidebar:S}),[b,v,C,d,h,p,S]);return r.jsx(mO.Provider,{value:y,children:r.jsx(uq,{delayDuration:0,children:r.jsx("div",{style:{"--sidebar-width":mq,"--sidebar-width-icon":bq,...a},className:Te("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",s),ref:c,...u,children:o})})})});gO.displayName="SidebarProvider";const bO=w.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:s,children:a,...o},u)=>{const{isMobile:c,state:d,openMobile:h,setOpenMobile:p}=gm();return n==="none"?r.jsx("div",{className:Te("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",s),ref:u,...o,children:a}):c?r.jsx(Mj,{open:h,onOpenChange:p,...o,children:r.jsxs(fy,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":gq},side:e,children:[r.jsxs(py,{className:"sr-only",children:[r.jsx(my,{children:"Sidebar"}),r.jsx(Pj,{children:"Displays the mobile sidebar."})]}),r.jsx("div",{className:"flex h-full w-full flex-col",children:a})]})}):r.jsxs("div",{ref:u,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?n:"","data-variant":t,"data-side":e,children:[r.jsx("div",{className:Te("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),r.jsx("div",{className:Te("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",s),...o,children:r.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:a})})]})});bO.displayName="Sidebar";const xO=w.forwardRef(({className:e,onClick:t,...n},s)=>{const{toggleSidebar:a}=gm();return r.jsxs(re,{ref:s,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:Te("h-7 w-7",e),onClick:o=>{t?.(o),a()},...n,children:[r.jsx(qU,{}),r.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});xO.displayName="SidebarTrigger";const vq=w.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:s}=gm();return r.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:s,title:"Toggle Sidebar",className:Te("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});vq.displayName="SidebarRail";const vO=w.forwardRef(({className:e,...t},n)=>r.jsx("main",{ref:n,className:Te("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));vO.displayName="SidebarInset";const yq=w.forwardRef(({className:e,...t},n)=>r.jsx(Fe,{ref:n,"data-sidebar":"input",className:Te("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));yq.displayName="SidebarInput";const yO=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"header",className:Te("flex flex-col gap-2 p-2",e),...t}));yO.displayName="SidebarHeader";const EO=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"footer",className:Te("flex flex-col gap-2 p-2",e),...t}));EO.displayName="SidebarFooter";const Eq=w.forwardRef(({className:e,...t},n)=>r.jsx(or,{ref:n,"data-sidebar":"separator",className:Te("mx-2 w-auto bg-sidebar-border",e),...t}));Eq.displayName="SidebarSeparator";const SO=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"content",className:Te("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));SO.displayName="SidebarContent";const rp=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group",className:Te("relative flex w-full min-w-0 flex-col p-2",e),...t}));rp.displayName="SidebarGroup";const sp=w.forwardRef(({className:e,asChild:t=!1,...n},s)=>{const a=t?dc:"div";return r.jsx(a,{ref:s,"data-sidebar":"group-label",className:Te("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...n})});sp.displayName="SidebarGroupLabel";const Sq=w.forwardRef(({className:e,asChild:t=!1,...n},s)=>{const a=t?dc:"button";return r.jsx(a,{ref:s,"data-sidebar":"group-action",className:Te("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})});Sq.displayName="SidebarGroupAction";const ap=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"group-content",className:Te("w-full text-sm",e),...t}));ap.displayName="SidebarGroupContent";const Ol=w.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu",className:Te("flex w-full min-w-0 flex-col gap-1",e),...t}));Ol.displayName="SidebarMenu";const Ll=w.forwardRef(({className:e,...t},n)=>r.jsx("li",{ref:n,"data-sidebar":"menu-item",className:Te("group/menu-item relative",e),...t}));Ll.displayName="SidebarMenuItem";const _q=fc("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Ml=w.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:s="default",tooltip:a,className:o,...u},c)=>{const d=e?dc:"button",{isMobile:h,state:p}=gm(),m=r.jsx(d,{ref:c,"data-sidebar":"menu-button","data-size":s,"data-active":t,className:Te(_q({variant:n,size:s}),o),...u});return a?(typeof a=="string"&&(a={children:a}),r.jsxs(dq,{children:[r.jsx(hq,{asChild:!0,children:m}),r.jsx(pO,{side:"right",align:"center",hidden:p!=="collapsed"||h,...a})]})):m});Ml.displayName="SidebarMenuButton";const wq=w.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...s},a)=>{const o=t?dc:"button";return r.jsx(o,{ref:a,"data-sidebar":"menu-action",className:Te("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...s})});wq.displayName="SidebarMenuAction";const Z0=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:Te("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-full px-1.5 text-xs font-semibold tabular-nums shadow-sm","transition-all duration-200 ease-in-out hover:scale-110","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));Z0.displayName="SidebarMenuBadge";const Cq=w.forwardRef(({className:e,showIcon:t=!1,...n},s)=>{const a=w.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return r.jsxs("div",{ref:s,"data-sidebar":"menu-skeleton",className:Te("flex h-8 items-center gap-2 rounded-md px-2",e),...n,children:[t&&r.jsx(ek,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),r.jsx(ek,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})});Cq.displayName="SidebarMenuSkeleton";const Nq=w.forwardRef(({className:e,...t},n)=>r.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:Te("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));Nq.displayName="SidebarMenuSub";const Tq=w.forwardRef(({...e},t)=>r.jsx("li",{ref:t,...e}));Tq.displayName="SidebarMenuSubItem";const Aq=w.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:s,...a},o)=>{const u=e?dc:"a";return r.jsx(u,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:Te("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",s),...a})});Aq.displayName="SidebarMenuSubButton";const kq="1.0.69-alpha.19",Rq={version:kq};function Dq({className:e}){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[r.jsx("path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"}),r.jsx("path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"}),r.jsx("path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"}),r.jsx("path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"})]})}const Iq=[{title:"Home",url:"/",icon:yU},{title:"Proposals",url:"/proposals",icon:Ku},{title:"Agents",url:"/agents",icon:mr},{title:"Code",url:"/code",icon:ja},{title:"Utilities",url:"/utilities",icon:H0}],jq=[{title:"Overview",url:"/context/project",icon:Nr},{title:"Architecture",url:"/context/architecture",icon:Li},{title:"Knowledge",url:"/context/knowledge",icon:b9},{title:"Resources",url:"/resources",icon:rm}],Oq=[{title:"Source Control",url:"/git",icon:Ri},{title:"Terminal",url:"/terminal",icon:Oa},{title:"Schedule",url:"/schedule",icon:Zf},{title:"Identity",url:"/identity",icon:SU}],Lq=[{title:"Documentation",url:"https://docs.coconut.dev/",icon:zU,external:!0},{title:"Settings",url:"/settings/user",icon:Xl}];function Mq(){const{badges:e}=Kp();return r.jsxs(bO,{className:"bg-sidebar border-r border-sidebar-border",children:[r.jsx(yO,{children:r.jsx(Ol,{children:r.jsx(Ll,{children:r.jsx(Ml,{size:"lg",asChild:!0,className:"[&>svg]:!size-8",children:r.jsxs(it,{to:"/",children:[r.jsx(Dq,{className:"size-8"}),r.jsxs("div",{className:"flex flex-col gap-0.5",children:[r.jsxs("span",{className:"font-semibold",children:[r.jsx("span",{className:"bg-gradient-to-r from-amber-500 via-orange-500 to-yellow-600 bg-clip-text text-transparent",children:"Coconut"}),r.jsx("span",{children:" Studio"})]}),r.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",Rq.version]})]})]})})})})}),r.jsxs(SO,{children:[r.jsxs(rp,{children:[r.jsx(sp,{children:"Main"}),r.jsx(ap,{children:r.jsx(Ol,{children:Iq.map(t=>r.jsxs(Ll,{children:[r.jsx(Ml,{asChild:!0,children:r.jsxs(it,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),t.title==="Code"&&e.codeSessions>0&&r.jsx(Z0,{className:"bg-blue-600 text-white dark:bg-blue-500",children:e.codeSessions})]},t.title))})})]}),r.jsxs(rp,{children:[r.jsx(sp,{children:"Project"}),r.jsx(ap,{children:r.jsx(Ol,{children:jq.map(t=>r.jsx(Ll,{children:r.jsx(Ml,{asChild:!0,children:r.jsxs(it,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]}),r.jsxs(rp,{children:[r.jsx(sp,{children:"System"}),r.jsx(ap,{children:r.jsx(Ol,{children:Oq.map(t=>{let n=0;return t.title==="Source Control"&&e.gitChanges>0?n=e.gitChanges:t.title==="Terminal"&&e.terminalSessions>0?n=e.terminalSessions:t.title==="Schedule"&&e.runningScheduledJobs>0&&(n=e.runningScheduledJobs),r.jsxs(Ll,{children:[r.jsx(Ml,{asChild:!0,children:r.jsxs(it,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})}),n>0&&r.jsx(Z0,{className:"bg-blue-600 text-white dark:bg-blue-500",children:n})]},t.title)})})})]})]}),r.jsx(EO,{children:r.jsx(Ol,{children:Lq.map(t=>r.jsx(Ll,{children:r.jsx(Ml,{asChild:!0,children:t.external?r.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]}):r.jsxs(it,{to:t.url,children:[r.jsx(t.icon,{}),r.jsx("span",{children:t.title})]})})},t.title))})})]})}function Q0(e,[t,n]){return Math.min(n,Math.max(t,e))}var Fq=w.createContext(void 0);function vc(e){const t=w.useContext(Fq);return e||t||"ltr"}function Dy(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Pq=[" ","Enter","ArrowUp","ArrowDown"],Bq=[" ","Enter"],_o="Select",[bm,xm,Uq]=Zp(_o),[yc,qde]=Fr(_o,[Uq,xc]),vm=xc(),[Hq,Hi]=yc(_o),[$q,zq]=yc(_o),_O=e=>{const{__scopeSelect:t,children:n,open:s,defaultOpen:a,onOpenChange:o,value:u,defaultValue:c,onValueChange:d,dir:h,name:p,autoComplete:m,disabled:g,required:v,form:C}=e,S=vm(t),[b,y]=w.useState(null),[E,_]=w.useState(null),[N,A]=w.useState(!1),k=vc(h),[I,R]=ia({prop:s,defaultProp:a??!1,onChange:o,caller:_o}),[M,L]=ia({prop:u,defaultProp:c,onChange:d,caller:_o}),$=w.useRef(null),H=b?C||!!b.closest("form"):!0,[B,z]=w.useState(new Set),Q=Array.from(B).map(P=>P.props.value).join(";");return r.jsx(Ny,{...S,children:r.jsxs(Hq,{required:v,scope:t,trigger:b,onTriggerChange:y,valueNode:E,onValueNodeChange:_,valueNodeHasChildren:N,onValueNodeHasChildrenChange:A,contentId:Ms(),value:M,onValueChange:L,open:I,onOpenChange:R,dir:k,triggerPointerDownPosRef:$,disabled:g,children:[r.jsx(bm.Provider,{scope:t,children:r.jsx($q,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(P=>{z(X=>new Set(X).add(P))},[]),onNativeOptionRemove:w.useCallback(P=>{z(X=>{const Y=new Set(X);return Y.delete(P),Y})},[]),children:n})}),H?r.jsxs(VO,{"aria-hidden":!0,required:v,tabIndex:-1,name:p,autoComplete:m,value:M,onChange:P=>L(P.target.value),disabled:g,form:C,children:[M===void 0?r.jsx("option",{value:""}):null,Array.from(B)]},Q):null]})})};_O.displayName=_o;var wO="SelectTrigger",CO=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:s=!1,...a}=e,o=vm(n),u=Hi(wO,n),c=u.disabled||s,d=Tt(t,u.onTriggerChange),h=xm(n),p=w.useRef("touch"),[m,g,v]=KO(S=>{const b=h().filter(_=>!_.disabled),y=b.find(_=>_.value===u.value),E=XO(b,S,y);E!==void 0&&u.onValueChange(E.value)}),C=S=>{c||(u.onOpenChange(!0),v()),S&&(u.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return r.jsx(Ty,{asChild:!0,...o,children:r.jsx(ht.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":YO(u.value)?"":void 0,...a,ref:d,onClick:Ve(a.onClick,S=>{S.currentTarget.focus(),p.current!=="mouse"&&C(S)}),onPointerDown:Ve(a.onPointerDown,S=>{p.current=S.pointerType;const b=S.target;b.hasPointerCapture(S.pointerId)&&b.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(C(S),S.preventDefault())}),onKeyDown:Ve(a.onKeyDown,S=>{const b=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&g(S.key),!(b&&S.key===" ")&&Pq.includes(S.key)&&(C(),S.preventDefault())})})})});CO.displayName=wO;var NO="SelectValue",TO=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:a,children:o,placeholder:u="",...c}=e,d=Hi(NO,n),{onValueNodeHasChildrenChange:h}=d,p=o!==void 0,m=Tt(t,d.onValueNodeChange);return cr(()=>{h(p)},[h,p]),r.jsx(ht.span,{...c,ref:m,style:{pointerEvents:"none"},children:YO(d.value)?r.jsx(r.Fragment,{children:u}):o})});TO.displayName=NO;var Gq="SelectIcon",AO=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:s,...a}=e;return r.jsx(ht.span,{"aria-hidden":!0,...a,ref:t,children:s||"▼"})});AO.displayName=Gq;var qq="SelectPortal",kO=e=>r.jsx(Dd,{asChild:!0,...e});kO.displayName=qq;var wo="SelectContent",RO=w.forwardRef((e,t)=>{const n=Hi(wo,e.__scopeSelect),[s,a]=w.useState();if(cr(()=>{a(new DocumentFragment)},[]),!n.open){const o=s;return o?cc.createPortal(r.jsx(DO,{scope:e.__scopeSelect,children:r.jsx(bm.Slot,{scope:e.__scopeSelect,children:r.jsx("div",{children:e.children})})}),o):null}return r.jsx(IO,{...e,ref:t})});RO.displayName=wo;var js=10,[DO,$i]=yc(wo),Wq="SelectContentImpl",Vq=yo("SelectContent.RemoveScroll"),IO=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:s="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:u,side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:g,collisionPadding:v,sticky:C,hideWhenDetached:S,avoidCollisions:b,...y}=e,E=Hi(wo,n),[_,N]=w.useState(null),[A,k]=w.useState(null),I=Tt(t,K=>N(K)),[R,M]=w.useState(null),[L,$]=w.useState(null),H=xm(n),[B,z]=w.useState(!1),Q=w.useRef(!1);w.useEffect(()=>{if(_)return oy(_)},[_]),iy();const P=w.useCallback(K=>{const[G,...Z]=H().map(ne=>ne.ref.current),[ce]=Z.slice(-1),le=document.activeElement;for(const ne of K)if(ne===le||(ne?.scrollIntoView({block:"nearest"}),ne===G&&A&&(A.scrollTop=0),ne===ce&&A&&(A.scrollTop=A.scrollHeight),ne?.focus(),document.activeElement!==le))return},[H,A]),X=w.useCallback(()=>P([R,_]),[P,R,_]);w.useEffect(()=>{B&&X()},[B,X]);const{onOpenChange:Y,triggerPointerDownPosRef:F}=E;w.useEffect(()=>{if(_){let K={x:0,y:0};const G=ce=>{K={x:Math.abs(Math.round(ce.pageX)-(F.current?.x??0)),y:Math.abs(Math.round(ce.pageY)-(F.current?.y??0))}},Z=ce=>{K.x<=10&&K.y<=10?ce.preventDefault():_.contains(ce.target)||Y(!1),document.removeEventListener("pointermove",G),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",Z,{capture:!0})}}},[_,Y,F]),w.useEffect(()=>{const K=()=>Y(!1);return window.addEventListener("blur",K),window.addEventListener("resize",K),()=>{window.removeEventListener("blur",K),window.removeEventListener("resize",K)}},[Y]);const[O,V]=KO(K=>{const G=H().filter(le=>!le.disabled),Z=G.find(le=>le.ref.current===document.activeElement),ce=XO(G,K,Z);ce&&setTimeout(()=>ce.ref.current.focus())}),te=w.useCallback((K,G,Z)=>{const ce=!Q.current&&!Z;(E.value!==void 0&&E.value===G||ce)&&(M(K),ce&&(Q.current=!0))},[E.value]),U=w.useCallback(()=>_?.focus(),[_]),W=w.useCallback((K,G,Z)=>{const ce=!Q.current&&!Z;(E.value!==void 0&&E.value===G||ce)&&$(K)},[E.value]),ae=s==="popper"?J0:jO,se=ae===J0?{side:c,sideOffset:d,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:g,collisionPadding:v,sticky:C,hideWhenDetached:S,avoidCollisions:b}:{};return r.jsx(DO,{scope:n,content:_,viewport:A,onViewportChange:k,itemRefCallback:te,selectedItem:R,onItemLeave:U,itemTextRefCallback:W,focusSelectedItem:X,selectedItemText:L,position:s,isPositioned:B,searchRef:O,children:r.jsx(om,{as:Vq,allowPinchZoom:!0,children:r.jsx(am,{asChild:!0,trapped:E.open,onMountAutoFocus:K=>{K.preventDefault()},onUnmountAutoFocus:Ve(a,K=>{E.trigger?.focus({preventScroll:!0}),K.preventDefault()}),children:r.jsx(hc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:u,onFocusOutside:K=>K.preventDefault(),onDismiss:()=>E.onOpenChange(!1),children:r.jsx(ae,{role:"listbox",id:E.contentId,"data-state":E.open?"open":"closed",dir:E.dir,onContextMenu:K=>K.preventDefault(),...y,...se,onPlaced:()=>z(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:Ve(y.onKeyDown,K=>{const G=K.ctrlKey||K.altKey||K.metaKey;if(K.key==="Tab"&&K.preventDefault(),!G&&K.key.length===1&&V(K.key),["ArrowUp","ArrowDown","Home","End"].includes(K.key)){let ce=H().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(K.key)&&(ce=ce.slice().reverse()),["ArrowUp","ArrowDown"].includes(K.key)){const le=K.target,ne=ce.indexOf(le);ce=ce.slice(ne+1)}setTimeout(()=>P(ce)),K.preventDefault()}})})})})})})});IO.displayName=Wq;var Yq="SelectItemAlignedPosition",jO=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:s,...a}=e,o=Hi(wo,n),u=$i(wo,n),[c,d]=w.useState(null),[h,p]=w.useState(null),m=Tt(t,I=>p(I)),g=xm(n),v=w.useRef(!1),C=w.useRef(!0),{viewport:S,selectedItem:b,selectedItemText:y,focusSelectedItem:E}=u,_=w.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&h&&S&&b&&y){const I=o.trigger.getBoundingClientRect(),R=h.getBoundingClientRect(),M=o.valueNode.getBoundingClientRect(),L=y.getBoundingClientRect();if(o.dir!=="rtl"){const le=L.left-R.left,ne=M.left-le,pe=I.left-ne,ye=I.width+pe,Ge=Math.max(ye,R.width),Ke=window.innerWidth-js,Re=Q0(ne,[js,Math.max(js,Ke-Ge)]);c.style.minWidth=ye+"px",c.style.left=Re+"px"}else{const le=R.right-L.right,ne=window.innerWidth-M.right-le,pe=window.innerWidth-I.right-ne,ye=I.width+pe,Ge=Math.max(ye,R.width),Ke=window.innerWidth-js,Re=Q0(ne,[js,Math.max(js,Ke-Ge)]);c.style.minWidth=ye+"px",c.style.right=Re+"px"}const $=g(),H=window.innerHeight-js*2,B=S.scrollHeight,z=window.getComputedStyle(h),Q=parseInt(z.borderTopWidth,10),P=parseInt(z.paddingTop,10),X=parseInt(z.borderBottomWidth,10),Y=parseInt(z.paddingBottom,10),F=Q+P+B+Y+X,O=Math.min(b.offsetHeight*5,F),V=window.getComputedStyle(S),te=parseInt(V.paddingTop,10),U=parseInt(V.paddingBottom,10),W=I.top+I.height/2-js,ae=H-W,se=b.offsetHeight/2,K=b.offsetTop+se,G=Q+P+K,Z=F-G;if(G<=W){const le=$.length>0&&b===$[$.length-1].ref.current;c.style.bottom="0px";const ne=h.clientHeight-S.offsetTop-S.offsetHeight,pe=Math.max(ae,se+(le?U:0)+ne+X),ye=G+pe;c.style.height=ye+"px"}else{const le=$.length>0&&b===$[0].ref.current;c.style.top="0px";const pe=Math.max(W,Q+S.offsetTop+(le?te:0)+se)+Z;c.style.height=pe+"px",S.scrollTop=G-W+S.offsetTop}c.style.margin=`${js}px 0`,c.style.minHeight=O+"px",c.style.maxHeight=H+"px",s?.(),requestAnimationFrame(()=>v.current=!0)}},[g,o.trigger,o.valueNode,c,h,S,b,y,o.dir,s]);cr(()=>_(),[_]);const[N,A]=w.useState();cr(()=>{h&&A(window.getComputedStyle(h).zIndex)},[h]);const k=w.useCallback(I=>{I&&C.current===!0&&(_(),E?.(),C.current=!1)},[_,E]);return r.jsx(Xq,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:v,onScrollButtonChange:k,children:r.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:N},children:r.jsx(ht.div,{...a,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});jO.displayName=Yq;var Kq="SelectPopperPosition",J0=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:s="start",collisionPadding:a=js,...o}=e,u=vm(n);return r.jsx(Ay,{...u,...o,ref:t,align:s,collisionPadding:a,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});J0.displayName=Kq;var[Xq,Iy]=yc(wo,{}),ev="SelectViewport",OO=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:s,...a}=e,o=$i(ev,n),u=Iy(ev,n),c=Tt(t,o.onViewportChange),d=w.useRef(0);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),r.jsx(bm.Slot,{scope:n,children:r.jsx(ht.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Ve(a.onScroll,h=>{const p=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:g}=u;if(g?.current&&m){const v=Math.abs(d.current-p.scrollTop);if(v>0){const C=window.innerHeight-js*2,S=parseFloat(m.style.minHeight),b=parseFloat(m.style.height),y=Math.max(S,b);if(y<C){const E=y+v,_=Math.min(C,E),N=E-_;m.style.height=_+"px",m.style.bottom==="0px"&&(p.scrollTop=N>0?N:0,m.style.justifyContent="flex-end")}}}d.current=p.scrollTop})})})]})});OO.displayName=ev;var LO="SelectGroup",[Zq,Qq]=yc(LO),Jq=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=Ms();return r.jsx(Zq,{scope:n,id:a,children:r.jsx(ht.div,{role:"group","aria-labelledby":a,...s,ref:t})})});Jq.displayName=LO;var MO="SelectLabel",FO=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=Qq(MO,n);return r.jsx(ht.div,{id:a.id,...s,ref:t})});FO.displayName=MO;var wp="SelectItem",[eW,PO]=yc(wp),BO=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:s,disabled:a=!1,textValue:o,...u}=e,c=Hi(wp,n),d=$i(wp,n),h=c.value===s,[p,m]=w.useState(o??""),[g,v]=w.useState(!1),C=Tt(t,E=>d.itemRefCallback?.(E,s,a)),S=Ms(),b=w.useRef("touch"),y=()=>{a||(c.onValueChange(s),c.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return r.jsx(eW,{scope:n,value:s,disabled:a,textId:S,isSelected:h,onItemTextChange:w.useCallback(E=>{m(_=>_||(E?.textContent??"").trim())},[]),children:r.jsx(bm.ItemSlot,{scope:n,value:s,disabled:a,textValue:p,children:r.jsx(ht.div,{role:"option","aria-labelledby":S,"data-highlighted":g?"":void 0,"aria-selected":h&&g,"data-state":h?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...u,ref:C,onFocus:Ve(u.onFocus,()=>v(!0)),onBlur:Ve(u.onBlur,()=>v(!1)),onClick:Ve(u.onClick,()=>{b.current!=="mouse"&&y()}),onPointerUp:Ve(u.onPointerUp,()=>{b.current==="mouse"&&y()}),onPointerDown:Ve(u.onPointerDown,E=>{b.current=E.pointerType}),onPointerMove:Ve(u.onPointerMove,E=>{b.current=E.pointerType,a?d.onItemLeave?.():b.current==="mouse"&&E.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ve(u.onPointerLeave,E=>{E.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:Ve(u.onKeyDown,E=>{d.searchRef?.current!==""&&E.key===" "||(Bq.includes(E.key)&&y(),E.key===" "&&E.preventDefault())})})})})});BO.displayName=wp;var Gu="SelectItemText",UO=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:a,...o}=e,u=Hi(Gu,n),c=$i(Gu,n),d=PO(Gu,n),h=zq(Gu,n),[p,m]=w.useState(null),g=Tt(t,y=>m(y),d.onItemTextChange,y=>c.itemTextRefCallback?.(y,d.value,d.disabled)),v=p?.textContent,C=w.useMemo(()=>r.jsx("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:S,onNativeOptionRemove:b}=h;return cr(()=>(S(C),()=>b(C)),[S,b,C]),r.jsxs(r.Fragment,{children:[r.jsx(ht.span,{id:d.textId,...o,ref:g}),d.isSelected&&u.valueNode&&!u.valueNodeHasChildren?cc.createPortal(o.children,u.valueNode):null]})});UO.displayName=Gu;var HO="SelectItemIndicator",$O=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return PO(HO,n).isSelected?r.jsx(ht.span,{"aria-hidden":!0,...s,ref:t}):null});$O.displayName=HO;var tv="SelectScrollUpButton",zO=w.forwardRef((e,t)=>{const n=$i(tv,e.__scopeSelect),s=Iy(tv,e.__scopeSelect),[a,o]=w.useState(!1),u=Tt(t,s.onScrollButtonChange);return cr(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollTop>0;o(h)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?r.jsx(qO,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop-d.offsetHeight)}}):null});zO.displayName=tv;var nv="SelectScrollDownButton",GO=w.forwardRef((e,t)=>{const n=$i(nv,e.__scopeSelect),s=Iy(nv,e.__scopeSelect),[a,o]=w.useState(!1),u=Tt(t,s.onScrollButtonChange);return cr(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=d.scrollHeight-d.clientHeight,p=Math.ceil(d.scrollTop)<h;o(p)};const d=n.viewport;return c(),d.addEventListener("scroll",c),()=>d.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),a?r.jsx(qO,{...e,ref:u,onAutoScroll:()=>{const{viewport:c,selectedItem:d}=n;c&&d&&(c.scrollTop=c.scrollTop+d.offsetHeight)}}):null});GO.displayName=nv;var qO=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:s,...a}=e,o=$i("SelectScrollButton",n),u=w.useRef(null),c=xm(n),d=w.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return w.useEffect(()=>()=>d(),[d]),cr(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),r.jsx(ht.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:Ve(a.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(s,50))}),onPointerMove:Ve(a.onPointerMove,()=>{o.onItemLeave?.(),u.current===null&&(u.current=window.setInterval(s,50))}),onPointerLeave:Ve(a.onPointerLeave,()=>{d()})})}),tW="SelectSeparator",WO=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return r.jsx(ht.div,{"aria-hidden":!0,...s,ref:t})});WO.displayName=tW;var rv="SelectArrow",nW=w.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=vm(n),o=Hi(rv,n),u=$i(rv,n);return o.open&&u.position==="popper"?r.jsx(ky,{...a,...s,ref:t}):null});nW.displayName=rv;var rW="SelectBubbleInput",VO=w.forwardRef(({__scopeSelect:e,value:t,...n},s)=>{const a=w.useRef(null),o=Tt(s,a),u=Dy(t);return w.useEffect(()=>{const c=a.current;if(!c)return;const d=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(d,"value").set;if(u!==t&&p){const m=new Event("change",{bubbles:!0});p.call(c,t),c.dispatchEvent(m)}},[u,t]),r.jsx(ht.select,{...n,style:{...uI,...n.style},ref:o,defaultValue:t})});VO.displayName=rW;function YO(e){return e===""||e===void 0}function KO(e){const t=Pn(e),n=w.useRef(""),s=w.useRef(0),a=w.useCallback(u=>{const c=n.current+u;t(c),(function d(h){n.current=h,window.clearTimeout(s.current),h!==""&&(s.current=window.setTimeout(()=>d(""),1e3))})(c)},[t]),o=w.useCallback(()=>{n.current="",window.clearTimeout(s.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(s.current),[]),[n,a,o]}function XO(e,t,n){const a=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let u=sW(e,Math.max(o,0));a.length===1&&(u=u.filter(h=>h!==n));const d=u.find(h=>h.textValue.toLowerCase().startsWith(a.toLowerCase()));return d!==n?d:void 0}function sW(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var aW=_O,ZO=CO,iW=TO,oW=AO,lW=kO,QO=RO,cW=OO,JO=FO,e3=BO,uW=UO,dW=$O,t3=zO,n3=GO,r3=WO;const Zt=aW,Qt=iW,Wt=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(ZO,{ref:s,className:Te("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,r.jsx(oW,{asChild:!0,children:r.jsx(Fn,{className:"h-4 w-4 opacity-50"})})]}));Wt.displayName=ZO.displayName;const s3=w.forwardRef(({className:e,...t},n)=>r.jsx(t3,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(Kl,{className:"h-4 w-4"})}));s3.displayName=t3.displayName;const a3=w.forwardRef(({className:e,...t},n)=>r.jsx(n3,{ref:n,className:Te("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(Fn,{className:"h-4 w-4"})}));a3.displayName=n3.displayName;const Vt=w.forwardRef(({className:e,children:t,position:n="popper",...s},a)=>r.jsx(lW,{children:r.jsxs(QO,{ref:a,className:Te("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...s,children:[r.jsx(s3,{}),r.jsx(cW,{className:Te("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),r.jsx(a3,{})]})}));Vt.displayName=QO.displayName;const hW=w.forwardRef(({className:e,...t},n)=>r.jsx(JO,{ref:n,className:Te("px-2 py-1.5 text-sm font-semibold",e),...t}));hW.displayName=JO.displayName;const Le=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(e3,{ref:s,className:Te("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(dW,{children:r.jsx(os,{className:"h-4 w-4"})})}),r.jsx(uW,{children:t})]}));Le.displayName=e3.displayName;const fW=w.forwardRef(({className:e,...t},n)=>r.jsx(r3,{ref:n,className:Te("-mx-1 my-1 h-px bg-muted",e),...t}));fW.displayName=r3.displayName;const fn=dy,Cp=Lj,pW=hy,i3=w.forwardRef(({className:e,...t},n)=>r.jsx(Ld,{ref:n,className:Te("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));i3.displayName=Ld.displayName;const ln=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(pW,{children:[r.jsx(i3,{}),r.jsxs(Md,{ref:s,className:Te("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,r.jsxs(cm,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r.jsx(Tr,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ln.displayName=Md.displayName;const nn=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});nn.displayName="DialogHeader";const lr=({className:e,...t})=>r.jsx("div",{className:Te("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});lr.displayName="DialogFooter";const rn=w.forwardRef(({className:e,...t},n)=>r.jsx(Fd,{ref:n,className:Te("text-lg font-semibold leading-none tracking-tight",e),...t}));rn.displayName=Fd.displayName;const _n=w.forwardRef(({className:e,...t},n)=>r.jsx(Pd,{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));_n.displayName=Pd.displayName;var ym="Checkbox",[mW,Wde]=Fr(ym),[gW,jy]=mW(ym);function bW(e){const{__scopeCheckbox:t,checked:n,children:s,defaultChecked:a,disabled:o,form:u,name:c,onCheckedChange:d,required:h,value:p="on",internal_do_not_use_render:m}=e,[g,v]=ia({prop:n,defaultProp:a??!1,onChange:d,caller:ym}),[C,S]=w.useState(null),[b,y]=w.useState(null),E=w.useRef(!1),_=C?!!u||!!C.closest("form"):!0,N={checked:g,disabled:o,setChecked:v,control:C,setControl:S,name:c,form:u,value:p,hasConsumerStoppedPropagationRef:E,required:h,defaultChecked:ji(a)?!1:a,isFormControl:_,bubbleInput:b,setBubbleInput:y};return r.jsx(gW,{scope:t,...N,children:xW(m)?m(N):s})}var o3="CheckboxTrigger",l3=w.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...s},a)=>{const{control:o,value:u,disabled:c,checked:d,required:h,setControl:p,setChecked:m,hasConsumerStoppedPropagationRef:g,isFormControl:v,bubbleInput:C}=jy(o3,e),S=Tt(a,p),b=w.useRef(d);return w.useEffect(()=>{const y=o?.form;if(y){const E=()=>m(b.current);return y.addEventListener("reset",E),()=>y.removeEventListener("reset",E)}},[o,m]),r.jsx(ht.button,{type:"button",role:"checkbox","aria-checked":ji(d)?"mixed":d,"aria-required":h,"data-state":f3(d),"data-disabled":c?"":void 0,disabled:c,value:u,...s,ref:S,onKeyDown:Ve(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:Ve(n,y=>{m(E=>ji(E)?!0:!E),C&&v&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})});l3.displayName=o3;var Oy=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:s,checked:a,defaultChecked:o,required:u,disabled:c,value:d,onCheckedChange:h,form:p,...m}=e;return r.jsx(bW,{__scopeCheckbox:n,checked:a,defaultChecked:o,disabled:c,required:u,onCheckedChange:h,name:s,form:p,value:d,internal_do_not_use_render:({isFormControl:g})=>r.jsxs(r.Fragment,{children:[r.jsx(l3,{...m,ref:t,__scopeCheckbox:n}),g&&r.jsx(h3,{__scopeCheckbox:n})]})})});Oy.displayName=ym;var c3="CheckboxIndicator",u3=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:s,...a}=e,o=jy(c3,n);return r.jsx(xr,{present:s||ji(o.checked)||o.checked===!0,children:r.jsx(ht.span,{"data-state":f3(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});u3.displayName=c3;var d3="CheckboxBubbleInput",h3=w.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:s,hasConsumerStoppedPropagationRef:a,checked:o,defaultChecked:u,required:c,disabled:d,name:h,value:p,form:m,bubbleInput:g,setBubbleInput:v}=jy(d3,e),C=Tt(n,v),S=Dy(o),b=_y(s);w.useEffect(()=>{const E=g;if(!E)return;const _=window.HTMLInputElement.prototype,A=Object.getOwnPropertyDescriptor(_,"checked").set,k=!a.current;if(S!==o&&A){const I=new Event("click",{bubbles:k});E.indeterminate=ji(o),A.call(E,ji(o)?!1:o),E.dispatchEvent(I)}},[g,S,o,a]);const y=w.useRef(ji(o)?!1:o);return r.jsx(ht.input,{type:"checkbox","aria-hidden":!0,defaultChecked:u??y.current,required:c,disabled:d,name:h,value:p,form:m,...t,tabIndex:-1,ref:C,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});h3.displayName=d3;function xW(e){return typeof e=="function"}function ji(e){return e==="indeterminate"}function f3(e){return ji(e)?"indeterminate":e?"checked":"unchecked"}const ds=w.forwardRef(({className:e,...t},n)=>r.jsx(Oy,{ref:n,className:Te("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:r.jsx(u3,{className:Te("flex items-center justify-center text-current"),children:r.jsx(os,{className:"h-4 w-4"})})}));ds.displayName=Oy.displayName;const Fa=w.forwardRef(({className:e,onCheckedChange:t,onChange:n,...s},a)=>{const o=u=>{n?.(u),t?.(u.target.checked)};return r.jsxs("label",{className:Te("relative inline-flex cursor-pointer",e),children:[r.jsx("input",{type:"checkbox",className:"sr-only peer",onChange:o,ref:a,...s}),r.jsx("div",{className:"block bg-gray-300 w-9 h-5 rounded-full transition-colors duration-200 ease-in-out peer-checked:bg-blue-600"}),r.jsx("div",{className:"absolute left-0 top-0 bg-white w-4 h-4 rounded-full mt-0.5 ml-0.5 transition-transform duration-200 ease-in-out transform peer-checked:translate-x-4 shadow"})]})});Fa.displayName="Switch";function vW(e,t){return w.useReducer((n,s)=>t[n][s]??n,e)}var Ly="ScrollArea",[p3,Vde]=Fr(Ly),[yW,As]=p3(Ly),m3=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:s="hover",dir:a,scrollHideDelay:o=600,...u}=e,[c,d]=w.useState(null),[h,p]=w.useState(null),[m,g]=w.useState(null),[v,C]=w.useState(null),[S,b]=w.useState(null),[y,E]=w.useState(0),[_,N]=w.useState(0),[A,k]=w.useState(!1),[I,R]=w.useState(!1),M=Tt(t,$=>d($)),L=vc(a);return r.jsx(yW,{scope:n,type:s,dir:L,scrollHideDelay:o,scrollArea:c,viewport:h,onViewportChange:p,content:m,onContentChange:g,scrollbarX:v,onScrollbarXChange:C,scrollbarXEnabled:A,onScrollbarXEnabledChange:k,scrollbarY:S,onScrollbarYChange:b,scrollbarYEnabled:I,onScrollbarYEnabledChange:R,onCornerWidthChange:E,onCornerHeightChange:N,children:r.jsx(ht.div,{dir:L,...u,ref:M,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":_+"px",...e.style}})})});m3.displayName=Ly;var g3="ScrollAreaViewport",b3=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:s,nonce:a,...o}=e,u=As(g3,n),c=w.useRef(null),d=Tt(t,c,u.onViewportChange);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),r.jsx(ht.div,{"data-radix-scroll-area-viewport":"",...o,ref:d,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...e.style},children:r.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});b3.displayName=g3;var ua="ScrollAreaScrollbar",My=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=As(ua,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:u}=a,c=e.orientation==="horizontal";return w.useEffect(()=>(c?o(!0):u(!0),()=>{c?o(!1):u(!1)}),[c,o,u]),a.type==="hover"?r.jsx(EW,{...s,ref:t,forceMount:n}):a.type==="scroll"?r.jsx(SW,{...s,ref:t,forceMount:n}):a.type==="auto"?r.jsx(x3,{...s,ref:t,forceMount:n}):a.type==="always"?r.jsx(Fy,{...s,ref:t}):null});My.displayName=ua;var EW=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=As(ua,e.__scopeScrollArea),[o,u]=w.useState(!1);return w.useEffect(()=>{const c=a.scrollArea;let d=0;if(c){const h=()=>{window.clearTimeout(d),u(!0)},p=()=>{d=window.setTimeout(()=>u(!1),a.scrollHideDelay)};return c.addEventListener("pointerenter",h),c.addEventListener("pointerleave",p),()=>{window.clearTimeout(d),c.removeEventListener("pointerenter",h),c.removeEventListener("pointerleave",p)}}},[a.scrollArea,a.scrollHideDelay]),r.jsx(xr,{present:n||o,children:r.jsx(x3,{"data-state":o?"visible":"hidden",...s,ref:t})})}),SW=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=As(ua,e.__scopeScrollArea),o=e.orientation==="horizontal",u=Sm(()=>d("SCROLL_END"),100),[c,d]=vW("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(c==="idle"){const h=window.setTimeout(()=>d("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(h)}},[c,a.scrollHideDelay,d]),w.useEffect(()=>{const h=a.viewport,p=o?"scrollLeft":"scrollTop";if(h){let m=h[p];const g=()=>{const v=h[p];m!==v&&(d("SCROLL"),u()),m=v};return h.addEventListener("scroll",g),()=>h.removeEventListener("scroll",g)}},[a.viewport,o,d,u]),r.jsx(xr,{present:n||c!=="hidden",children:r.jsx(Fy,{"data-state":c==="hidden"?"hidden":"visible",...s,ref:t,onPointerEnter:Ve(e.onPointerEnter,()=>d("POINTER_ENTER")),onPointerLeave:Ve(e.onPointerLeave,()=>d("POINTER_LEAVE"))})})}),x3=w.forwardRef((e,t)=>{const n=As(ua,e.__scopeScrollArea),{forceMount:s,...a}=e,[o,u]=w.useState(!1),c=e.orientation==="horizontal",d=Sm(()=>{if(n.viewport){const h=n.viewport.offsetWidth<n.viewport.scrollWidth,p=n.viewport.offsetHeight<n.viewport.scrollHeight;u(c?h:p)}},10);return Jl(n.viewport,d),Jl(n.content,d),r.jsx(xr,{present:s||o,children:r.jsx(Fy,{"data-state":o?"visible":"hidden",...a,ref:t})})}),Fy=w.forwardRef((e,t)=>{const{orientation:n="vertical",...s}=e,a=As(ua,e.__scopeScrollArea),o=w.useRef(null),u=w.useRef(0),[c,d]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),h=_3(c.viewport,c.content),p={...s,sizes:c,onSizesChange:d,hasThumb:h>0&&h<1,onThumbChange:g=>o.current=g,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:g=>u.current=g};function m(g,v){return AW(g,u.current,c,v)}return n==="horizontal"?r.jsx(_W,{...p,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const g=a.viewport.scrollLeft,v=dk(g,c,a.dir);o.current.style.transform=`translate3d(${v}px, 0, 0)`}},onWheelScroll:g=>{a.viewport&&(a.viewport.scrollLeft=g)},onDragScroll:g=>{a.viewport&&(a.viewport.scrollLeft=m(g,a.dir))}}):n==="vertical"?r.jsx(wW,{...p,ref:t,onThumbPositionChange:()=>{if(a.viewport&&o.current){const g=a.viewport.scrollTop,v=dk(g,c);o.current.style.transform=`translate3d(0, ${v}px, 0)`}},onWheelScroll:g=>{a.viewport&&(a.viewport.scrollTop=g)},onDragScroll:g=>{a.viewport&&(a.viewport.scrollTop=m(g))}}):null}),_W=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:s,...a}=e,o=As(ua,e.__scopeScrollArea),[u,c]=w.useState(),d=w.useRef(null),h=Tt(t,d,o.onScrollbarXChange);return w.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(y3,{"data-orientation":"horizontal",...a,ref:h,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Em(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.x),onDragScroll:p=>e.onDragScroll(p.x),onWheelScroll:(p,m)=>{if(o.viewport){const g=o.viewport.scrollLeft+p.deltaX;e.onWheelScroll(g),C3(g,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&s({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:Tp(u.paddingLeft),paddingEnd:Tp(u.paddingRight)}})}})}),wW=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:s,...a}=e,o=As(ua,e.__scopeScrollArea),[u,c]=w.useState(),d=w.useRef(null),h=Tt(t,d,o.onScrollbarYChange);return w.useEffect(()=>{d.current&&c(getComputedStyle(d.current))},[d]),r.jsx(y3,{"data-orientation":"vertical",...a,ref:h,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Em(n)+"px",...e.style},onThumbPointerDown:p=>e.onThumbPointerDown(p.y),onDragScroll:p=>e.onDragScroll(p.y),onWheelScroll:(p,m)=>{if(o.viewport){const g=o.viewport.scrollTop+p.deltaY;e.onWheelScroll(g),C3(g,m)&&p.preventDefault()}},onResize:()=>{d.current&&o.viewport&&u&&s({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:Tp(u.paddingTop),paddingEnd:Tp(u.paddingBottom)}})}})}),[CW,v3]=p3(ua),y3=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:s,hasThumb:a,onThumbChange:o,onThumbPointerUp:u,onThumbPointerDown:c,onThumbPositionChange:d,onDragScroll:h,onWheelScroll:p,onResize:m,...g}=e,v=As(ua,n),[C,S]=w.useState(null),b=Tt(t,M=>S(M)),y=w.useRef(null),E=w.useRef(""),_=v.viewport,N=s.content-s.viewport,A=Pn(p),k=Pn(d),I=Sm(m,10);function R(M){if(y.current){const L=M.clientX-y.current.left,$=M.clientY-y.current.top;h({x:L,y:$})}}return w.useEffect(()=>{const M=L=>{const $=L.target;C?.contains($)&&A(L,N)};return document.addEventListener("wheel",M,{passive:!1}),()=>document.removeEventListener("wheel",M,{passive:!1})},[_,C,N,A]),w.useEffect(k,[s,k]),Jl(C,I),Jl(v.content,I),r.jsx(CW,{scope:n,scrollbar:C,hasThumb:a,onThumbChange:Pn(o),onThumbPointerUp:Pn(u),onThumbPositionChange:k,onThumbPointerDown:Pn(c),children:r.jsx(ht.div,{...g,ref:b,style:{position:"absolute",...g.style},onPointerDown:Ve(e.onPointerDown,M=>{M.button===0&&(M.target.setPointerCapture(M.pointerId),y.current=C.getBoundingClientRect(),E.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",v.viewport&&(v.viewport.style.scrollBehavior="auto"),R(M))}),onPointerMove:Ve(e.onPointerMove,R),onPointerUp:Ve(e.onPointerUp,M=>{const L=M.target;L.hasPointerCapture(M.pointerId)&&L.releasePointerCapture(M.pointerId),document.body.style.webkitUserSelect=E.current,v.viewport&&(v.viewport.style.scrollBehavior=""),y.current=null})})})}),Np="ScrollAreaThumb",E3=w.forwardRef((e,t)=>{const{forceMount:n,...s}=e,a=v3(Np,e.__scopeScrollArea);return r.jsx(xr,{present:n||a.hasThumb,children:r.jsx(NW,{ref:t,...s})})}),NW=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:s,...a}=e,o=As(Np,n),u=v3(Np,n),{onThumbPositionChange:c}=u,d=Tt(t,m=>u.onThumbChange(m)),h=w.useRef(void 0),p=Sm(()=>{h.current&&(h.current(),h.current=void 0)},100);return w.useEffect(()=>{const m=o.viewport;if(m){const g=()=>{if(p(),!h.current){const v=kW(m,c);h.current=v,c()}};return c(),m.addEventListener("scroll",g),()=>m.removeEventListener("scroll",g)}},[o.viewport,p,c]),r.jsx(ht.div,{"data-state":u.hasThumb?"visible":"hidden",...a,ref:d,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:Ve(e.onPointerDownCapture,m=>{const v=m.target.getBoundingClientRect(),C=m.clientX-v.left,S=m.clientY-v.top;u.onThumbPointerDown({x:C,y:S})}),onPointerUp:Ve(e.onPointerUp,u.onThumbPointerUp)})});E3.displayName=Np;var Py="ScrollAreaCorner",S3=w.forwardRef((e,t)=>{const n=As(Py,e.__scopeScrollArea),s=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&s?r.jsx(TW,{...e,ref:t}):null});S3.displayName=Py;var TW=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...s}=e,a=As(Py,n),[o,u]=w.useState(0),[c,d]=w.useState(0),h=!!(o&&c);return Jl(a.scrollbarX,()=>{const p=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(p),d(p)}),Jl(a.scrollbarY,()=>{const p=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(p),u(p)}),h?r.jsx(ht.div,{...s,ref:t,style:{width:o,height:c,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Tp(e){return e?parseInt(e,10):0}function _3(e,t){const n=e/t;return isNaN(n)?0:n}function Em(e){const t=_3(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=(e.scrollbar.size-n)*t;return Math.max(s,18)}function AW(e,t,n,s="ltr"){const a=Em(n),o=a/2,u=t||o,c=a-u,d=n.scrollbar.paddingStart+u,h=n.scrollbar.size-n.scrollbar.paddingEnd-c,p=n.content-n.viewport,m=s==="ltr"?[0,p]:[p*-1,0];return w3([d,h],m)(e)}function dk(e,t,n="ltr"){const s=Em(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-a,u=t.content-t.viewport,c=o-s,d=n==="ltr"?[0,u]:[u*-1,0],h=Q0(e,d);return w3([0,u],[0,c])(h)}function w3(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const s=(t[1]-t[0])/(e[1]-e[0]);return t[0]+s*(n-e[0])}}function C3(e,t){return e>0&&e<t}var kW=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},s=0;return(function a(){const o={left:e.scrollLeft,top:e.scrollTop},u=n.left!==o.left,c=n.top!==o.top;(u||c)&&t(),n=o,s=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(s)};function Sm(e,t){const n=Pn(e),s=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(s.current),[]),w.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(n,t)},[n,t])}function Jl(e,t){const n=Pn(t);cr(()=>{let s=0;if(e){const a=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(n)});return a.observe(e),()=>{window.cancelAnimationFrame(s),a.unobserve(e)}}},[e,n])}var N3=m3,RW=b3,DW=S3;const Ns=w.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(N3,{ref:s,className:Te("relative overflow-hidden",e),...n,children:[r.jsx(RW,{className:"h-full w-full rounded-[inherit]",children:t}),r.jsx(T3,{}),r.jsx(DW,{})]}));Ns.displayName=N3.displayName;const T3=w.forwardRef(({className:e,orientation:t="vertical",...n},s)=>r.jsx(My,{ref:s,orientation:t,className:Te("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:r.jsx(E3,{className:"relative flex-1 rounded-full bg-border"})}));T3.displayName=My.displayName;function bd(e){const t=[],n=String(e||"");let s=n.indexOf(","),a=0,o=!1;for(;!o;){s===-1&&(s=n.length,o=!0);const u=n.slice(a,s).trim();(u||!o)&&t.push(u),a=s+1,s=n.indexOf(",",a)}return t}function _m(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const IW=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jW=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,OW={};function hk(e,t){return(OW.jsx?jW:IW).test(e)}const LW=/[ \t\n\f\r]/g;function Ud(e){return typeof e=="object"?e.type==="text"?fk(e.value):!1:fk(e)}function fk(e){return e.replace(LW,"")===""}let Hd=class{constructor(t,n,s){this.normal=n,this.property=t,s&&(this.space=s)}};Hd.prototype.normal={};Hd.prototype.property={};Hd.prototype.space=void 0;function A3(e,t){const n={},s={};for(const a of e)Object.assign(n,a.property),Object.assign(s,a.normal);return new Hd(n,s,t)}function xd(e){return e.toLowerCase()}let Zr=class{constructor(t,n){this.attribute=n,this.property=t}};Zr.prototype.attribute="";Zr.prototype.booleanish=!1;Zr.prototype.boolean=!1;Zr.prototype.commaOrSpaceSeparated=!1;Zr.prototype.commaSeparated=!1;Zr.prototype.defined=!1;Zr.prototype.mustUseProperty=!1;Zr.prototype.number=!1;Zr.prototype.overloadedBoolean=!1;Zr.prototype.property="";Zr.prototype.spaceSeparated=!1;Zr.prototype.space=void 0;let MW=0;const It=ko(),Gn=ko(),sv=ko(),qe=ko(),vn=ko(),$l=ko(),as=ko();function ko(){return 2**++MW}const av=Object.freeze(Object.defineProperty({__proto__:null,boolean:It,booleanish:Gn,commaOrSpaceSeparated:as,commaSeparated:$l,number:qe,overloadedBoolean:sv,spaceSeparated:vn},Symbol.toStringTag,{value:"Module"})),zx=Object.keys(av);let By=class extends Zr{constructor(t,n,s,a){let o=-1;if(super(t,n),pk(this,"space",a),typeof s=="number")for(;++o<zx.length;){const u=zx[o];pk(this,zx[o],(s&av[u])===av[u])}}};By.prototype.defined=!0;function pk(e,t,n){n&&(e[t]=n)}function Ec(e){const t={},n={};for(const[s,a]of Object.entries(e.properties)){const o=new By(s,e.transform(e.attributes||{},s),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[xd(s)]=s,n[xd(o.attribute)]=s}return new Hd(t,n,e.space)}const k3=Ec({properties:{ariaActiveDescendant:null,ariaAtomic:Gn,ariaAutoComplete:null,ariaBusy:Gn,ariaChecked:Gn,ariaColCount:qe,ariaColIndex:qe,ariaColSpan:qe,ariaControls:vn,ariaCurrent:null,ariaDescribedBy:vn,ariaDetails:null,ariaDisabled:Gn,ariaDropEffect:vn,ariaErrorMessage:null,ariaExpanded:Gn,ariaFlowTo:vn,ariaGrabbed:Gn,ariaHasPopup:null,ariaHidden:Gn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:vn,ariaLevel:qe,ariaLive:null,ariaModal:Gn,ariaMultiLine:Gn,ariaMultiSelectable:Gn,ariaOrientation:null,ariaOwns:vn,ariaPlaceholder:null,ariaPosInSet:qe,ariaPressed:Gn,ariaReadOnly:Gn,ariaRelevant:null,ariaRequired:Gn,ariaRoleDescription:vn,ariaRowCount:qe,ariaRowIndex:qe,ariaRowSpan:qe,ariaSelected:Gn,ariaSetSize:qe,ariaSort:null,ariaValueMax:qe,ariaValueMin:qe,ariaValueNow:qe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function R3(e,t){return t in e?e[t]:t}function D3(e,t){return R3(e,t.toLowerCase())}const FW=Ec({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$l,acceptCharset:vn,accessKey:vn,action:null,allow:null,allowFullScreen:It,allowPaymentRequest:It,allowUserMedia:It,alt:null,as:null,async:It,autoCapitalize:null,autoComplete:vn,autoFocus:It,autoPlay:It,blocking:vn,capture:null,charSet:null,checked:It,cite:null,className:vn,cols:qe,colSpan:null,content:null,contentEditable:Gn,controls:It,controlsList:vn,coords:qe|$l,crossOrigin:null,data:null,dateTime:null,decoding:null,default:It,defer:It,dir:null,dirName:null,disabled:It,download:sv,draggable:Gn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:It,formTarget:null,headers:vn,height:qe,hidden:sv,high:qe,href:null,hrefLang:null,htmlFor:vn,httpEquiv:vn,id:null,imageSizes:null,imageSrcSet:null,inert:It,inputMode:null,integrity:null,is:null,isMap:It,itemId:null,itemProp:vn,itemRef:vn,itemScope:It,itemType:vn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:It,low:qe,manifest:null,max:null,maxLength:qe,media:null,method:null,min:null,minLength:qe,multiple:It,muted:It,name:null,nonce:null,noModule:It,noValidate:It,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:It,optimum:qe,pattern:null,ping:vn,placeholder:null,playsInline:It,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:It,referrerPolicy:null,rel:vn,required:It,reversed:It,rows:qe,rowSpan:qe,sandbox:vn,scope:null,scoped:It,seamless:It,selected:It,shadowRootClonable:It,shadowRootDelegatesFocus:It,shadowRootMode:null,shape:null,size:qe,sizes:null,slot:null,span:qe,spellCheck:Gn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:qe,step:null,style:null,tabIndex:qe,target:null,title:null,translate:null,type:null,typeMustMatch:It,useMap:null,value:Gn,width:qe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:vn,axis:null,background:null,bgColor:null,border:qe,borderColor:null,bottomMargin:qe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:It,declare:It,event:null,face:null,frame:null,frameBorder:null,hSpace:qe,leftMargin:qe,link:null,longDesc:null,lowSrc:null,marginHeight:qe,marginWidth:qe,noResize:It,noHref:It,noShade:It,noWrap:It,object:null,profile:null,prompt:null,rev:null,rightMargin:qe,rules:null,scheme:null,scrolling:Gn,standby:null,summary:null,text:null,topMargin:qe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:qe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:It,disableRemotePlayback:It,prefix:null,property:null,results:qe,security:null,unselectable:null},space:"html",transform:D3}),PW=Ec({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:as,accentHeight:qe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:qe,amplitude:qe,arabicForm:null,ascent:qe,attributeName:null,attributeType:null,azimuth:qe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:qe,by:null,calcMode:null,capHeight:qe,className:vn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:qe,diffuseConstant:qe,direction:null,display:null,dur:null,divisor:qe,dominantBaseline:null,download:It,dx:null,dy:null,edgeMode:null,editable:null,elevation:qe,enableBackground:null,end:null,event:null,exponent:qe,externalResourcesRequired:null,fill:null,fillOpacity:qe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:$l,g2:$l,glyphName:$l,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:qe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:qe,horizOriginX:qe,horizOriginY:qe,id:null,ideographic:qe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:qe,k:qe,k1:qe,k2:qe,k3:qe,k4:qe,kernelMatrix:as,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:qe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:qe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:qe,overlineThickness:qe,paintOrder:null,panose1:null,path:null,pathLength:qe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:vn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:qe,pointsAtY:qe,pointsAtZ:qe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:as,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:as,rev:as,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:as,requiredFeatures:as,requiredFonts:as,requiredFormats:as,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:qe,specularExponent:qe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:qe,strikethroughThickness:qe,string:null,stroke:null,strokeDashArray:as,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:qe,strokeOpacity:qe,strokeWidth:null,style:null,surfaceScale:qe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:as,tabIndex:qe,tableValues:null,target:null,targetX:qe,targetY:qe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:as,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:qe,underlineThickness:qe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:qe,values:null,vAlphabetic:qe,vMathematical:qe,vectorEffect:null,vHanging:qe,vIdeographic:qe,version:null,vertAdvY:qe,vertOriginX:qe,vertOriginY:qe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:qe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:R3}),I3=Ec({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),j3=Ec({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:D3}),O3=Ec({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),BW={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},UW=/[A-Z]/g,mk=/-[a-z]/g,HW=/^data[-\w.:]+$/i;function $d(e,t){const n=xd(t);let s=t,a=Zr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&HW.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(mk,zW);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!mk.test(o)){let u=o.replace(UW,$W);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}a=By}return new a(s,t)}function $W(e){return"-"+e.toLowerCase()}function zW(e){return e.charAt(1).toUpperCase()}const Sc=A3([k3,FW,I3,j3,O3],"html"),Ja=A3([k3,PW,I3,j3,O3],"svg");function vd(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function wm(e){return e.join(" ").trim()}var Nl={},Gx,gk;function GW(){if(gk)return Gx;gk=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,s=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,a=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
655
655
|
`,h="/",p="*",m="",g="comment",v="declaration";Gx=function(S,b){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];b=b||{};var y=1,E=1;function _(B){var z=B.match(t);z&&(y+=z.length);var Q=B.lastIndexOf(d);E=~Q?B.length-Q:E+B.length}function N(){var B={line:y,column:E};return function(z){return z.position=new A(B),R(),z}}function A(B){this.start=B,this.end={line:y,column:E},this.source=b.source}A.prototype.content=S;function k(B){var z=new Error(b.source+":"+y+":"+E+": "+B);if(z.reason=B,z.filename=b.source,z.line=y,z.column=E,z.source=S,!b.silent)throw z}function I(B){var z=B.exec(S);if(z){var Q=z[0];return _(Q),S=S.slice(Q.length),z}}function R(){I(n)}function M(B){var z;for(B=B||[];z=L();)z!==!1&&B.push(z);return B}function L(){var B=N();if(!(h!=S.charAt(0)||p!=S.charAt(1))){for(var z=2;m!=S.charAt(z)&&(p!=S.charAt(z)||h!=S.charAt(z+1));)++z;if(z+=2,m===S.charAt(z-1))return k("End of comment missing");var Q=S.slice(2,z-2);return E+=2,_(Q),S=S.slice(z),E+=2,B({type:g,comment:Q})}}function $(){var B=N(),z=I(s);if(z){if(L(),!I(a))return k("property missing ':'");var Q=I(o),P=B({type:v,property:C(z[0].replace(e,m)),value:Q?C(Q[0].replace(e,m)):m});return I(u),P}}function H(){var B=[];M(B);for(var z;z=$();)z!==!1&&(B.push(z),M(B));return B}return R(),H()};function C(S){return S?S.replace(c,m):m}return Gx}var bk;function qW(){if(bk)return Nl;bk=1;var e=Nl&&Nl.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.default=n;var t=e(GW());function n(s,a){var o=null;if(!s||typeof s!="string")return o;var u=(0,t.default)(s),c=typeof a=="function";return u.forEach(function(d){if(d.type==="declaration"){var h=d.property,p=d.value;c?a(h,p,d):p&&(o=o||{},o[h]=p)}}),o}return Nl}var Ou={},xk;function WW(){if(xk)return Ou;xk=1,Object.defineProperty(Ou,"__esModule",{value:!0}),Ou.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,s=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},u=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},d=function(h,p){return p===void 0&&(p={}),o(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(a,c):h=h.replace(s,c),h.replace(t,u))};return Ou.camelCase=d,Ou}var Lu,vk;function VW(){if(vk)return Lu;vk=1;var e=Lu&&Lu.__importDefault||function(a){return a&&a.__esModule?a:{default:a}},t=e(qW()),n=WW();function s(a,o){var u={};return!a||typeof a!="string"||(0,t.default)(a,function(c,d){c&&d&&(u[(0,n.camelCase)(c,o)]=d)}),u}return s.default=s,Lu=s,Lu}var YW=VW();const KW=ac(YW),Cm=L3("end"),da=L3("start");function L3(e){return t;function t(n){const s=n&&n.position&&n.position[e]||{};if(typeof s.line=="number"&&s.line>0&&typeof s.column=="number"&&s.column>0)return{line:s.line,column:s.column,offset:typeof s.offset=="number"&&s.offset>-1?s.offset:void 0}}}function M3(e){const t=da(e),n=Cm(e);if(t&&n)return{start:t,end:n}}function Xu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?yk(e.position):"start"in e||"end"in e?yk(e):"line"in e||"column"in e?iv(e):""}function iv(e){return Ek(e&&e.line)+":"+Ek(e&&e.column)}function yk(e){return iv(e&&e.start)+"-"+iv(e&&e.end)}function Ek(e){return e&&typeof e=="number"?e:1}class vr extends Error{constructor(t,n,s){super(),typeof n=="string"&&(s=n,n=void 0);let a="",o={},u=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?a=t:!o.cause&&t&&(u=!0,a=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof s=="string"){const d=s.indexOf(":");d===-1?o.ruleId=s:(o.source=s.slice(0,d),o.ruleId=s.slice(d+1))}if(!o.place&&o.ancestors&&o.ancestors){const d=o.ancestors[o.ancestors.length-1];d&&(o.place=d.position)}const c=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=c?c.line:void 0,this.name=Xu(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=u&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}vr.prototype.file="";vr.prototype.name="";vr.prototype.reason="";vr.prototype.message="";vr.prototype.stack="";vr.prototype.column=void 0;vr.prototype.line=void 0;vr.prototype.ancestors=void 0;vr.prototype.cause=void 0;vr.prototype.fatal=void 0;vr.prototype.place=void 0;vr.prototype.ruleId=void 0;vr.prototype.source=void 0;const Uy={}.hasOwnProperty,XW=new Map,ZW=/[A-Z]/g,QW=new Set(["table","tbody","thead","tfoot","tr"]),JW=new Set(["td","th"]),F3="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function P3(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let s;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");s=oV(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");s=iV(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:s,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Ja:Sc,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=B3(a,e,void 0);return o&&typeof o!="string"?o:a.create(e,a.Fragment,{children:o||void 0},void 0)}function B3(e,t,n){if(t.type==="element")return eV(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return tV(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return rV(e,t,n);if(t.type==="mdxjsEsm")return nV(e,t);if(t.type==="root")return sV(e,t,n);if(t.type==="text")return aV(e,t)}function eV(e,t,n){const s=e.schema;let a=s;t.tagName.toLowerCase()==="svg"&&s.space==="html"&&(a=Ja,e.schema=a),e.ancestors.push(t);const o=H3(e,t.tagName,!1),u=lV(e,t);let c=$y(e,t);return QW.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Ud(d):!0})),U3(e,u,o,t),Hy(u,c),e.ancestors.pop(),e.schema=s,e.create(t,o,u,n)}function tV(e,t){if(t.data&&t.data.estree&&e.evaluater){const s=t.data.estree.body[0];return s.type,e.evaluater.evaluateExpression(s.expression)}yd(e,t.position)}function nV(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);yd(e,t.position)}function rV(e,t,n){const s=e.schema;let a=s;t.name==="svg"&&s.space==="html"&&(a=Ja,e.schema=a),e.ancestors.push(t);const o=t.name===null?e.Fragment:H3(e,t.name,!0),u=cV(e,t),c=$y(e,t);return U3(e,u,o,t),Hy(u,c),e.ancestors.pop(),e.schema=s,e.create(t,o,u,n)}function sV(e,t,n){const s={};return Hy(s,$y(e,t)),e.create(t,e.Fragment,s,n)}function aV(e,t){return t.value}function U3(e,t,n,s){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=s)}function Hy(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function iV(e,t,n){return s;function s(a,o,u,c){const h=Array.isArray(u.children)?n:t;return c?h(o,u,c):h(o,u)}}function oV(e,t){return n;function n(s,a,o,u){const c=Array.isArray(o.children),d=da(s);return t(a,o,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function lV(e,t){const n={};let s,a;for(a in t.properties)if(a!=="children"&&Uy.call(t.properties,a)){const o=uV(e,a,t.properties[a]);if(o){const[u,c]=o;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&JW.has(t.tagName)?s=c:n[u]=c}}if(s){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=s}return n}function cV(e,t){const n={};for(const s of t.attributes)if(s.type==="mdxJsxExpressionAttribute")if(s.data&&s.data.estree&&e.evaluater){const o=s.data.estree.body[0];o.type;const u=o.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else yd(e,t.position);else{const a=s.name;let o;if(s.value&&typeof s.value=="object")if(s.value.data&&s.value.data.estree&&e.evaluater){const c=s.value.data.estree.body[0];c.type,o=e.evaluater.evaluateExpression(c.expression)}else yd(e,t.position);else o=s.value===null?!0:s.value;n[a]=o}return n}function $y(e,t){const n=[];let s=-1;const a=e.passKeys?new Map:XW;for(;++s<t.children.length;){const o=t.children[s];let u;if(e.passKeys){const d=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(d){const h=a.get(d)||0;u=d+"-"+h,a.set(d,h+1)}}const c=B3(e,o,u);c!==void 0&&n.push(c)}return n}function uV(e,t,n){const s=$d(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=s.commaSeparated?_m(n):wm(n)),s.property==="style"){let a=typeof n=="object"?n:dV(e,String(n));return e.stylePropertyNameCase==="css"&&(a=hV(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&s.space?BW[s.property]||s.property:s.attribute,n]}}function dV(e,t){try{return KW(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const s=n,a=new vr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:s,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=F3+"#cannot-parse-style-attribute",a}}function H3(e,t,n){let s;if(!n)s={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let o=-1,u;for(;++o<a.length;){const c=hk(a[o])?{type:"Identifier",name:a[o]}:{type:"Literal",value:a[o]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(o&&c.type==="Literal"),optional:!1}:c}s=u}else s=hk(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(s.type==="Literal"){const a=s.value;return Uy.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(s);yd(e)}function yd(e,t){const n=new vr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=F3+"#cannot-handle-mdx-estrees-without-createevaluater",n}function hV(e){const t={};let n;for(n in e)Uy.call(e,n)&&(t[fV(n)]=e[n]);return t}function fV(e){let t=e.replace(ZW,pV);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function pV(e){return"-"+e.toLowerCase()}const zl={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},mV={};function zy(e,t){const n=mV,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return $3(e,s,a)}function $3(e,t,n){if(gV(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Sk(e.children,t,n)}return Array.isArray(e)?Sk(e,t,n):""}function Sk(e,t,n){const s=[];let a=-1;for(;++a<e.length;)s[a]=$3(e[a],t,n);return s.join("")}function gV(e){return!!(e&&typeof e=="object")}const _k=document.createElement("i");function Ed(e){const t="&"+e+";";_k.innerHTML=t;const n=_k.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function hs(e,t,n,s){const a=e.length;let o=0,u;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,s.length<1e4)u=Array.from(s),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);o<s.length;)u=s.slice(o,o+1e4),u.unshift(t,0),e.splice(...u),o+=1e4,t+=1e4}function Ss(e,t){return e.length>0?(hs(e,e.length,0,t),e):t}const wk={}.hasOwnProperty;function z3(e){const t={};let n=-1;for(;++n<e.length;)bV(t,e[n]);return t}function bV(e,t){let n;for(n in t){const a=(wk.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let u;if(o)for(u in o){wk.call(a,u)||(a[u]=[]);const c=o[u];xV(a[u],Array.isArray(c)?c:c?[c]:[])}}}function xV(e,t){let n=-1;const s=[];for(;++n<t.length;)(t[n].add==="after"?e:s).push(t[n]);hs(e,0,0,s)}function G3(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Fs(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Or=zi(/[A-Za-z]/),Ar=zi(/[\dA-Za-z]/),vV=zi(/[#-'*+\--9=?A-Z^-~]/);function Ap(e){return e!==null&&(e<32||e===127)}const ov=zi(/\d/),yV=zi(/[\dA-Fa-f]/),EV=zi(/[!-/:-@[-`{-~]/);function bt(e){return e!==null&&e<-2}function gn(e){return e!==null&&(e<0||e===32)}function $t(e){return e===-2||e===-1||e===32}const Nm=zi(new RegExp("\\p{P}|\\p{S}","u")),Co=zi(/\s/);function zi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function _c(e){const t=[];let n=-1,s=0,a=0;for(;++n<e.length;){const o=e.charCodeAt(n);let u="";if(o===37&&Ar(e.charCodeAt(n+1))&&Ar(e.charCodeAt(n+2)))a=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(u=String.fromCharCode(o));else if(o>55295&&o<57344){const c=e.charCodeAt(n+1);o<56320&&c>56319&&c<57344?(u=String.fromCharCode(o,c),a=1):u="�"}else u=String.fromCharCode(o);u&&(t.push(e.slice(s,n),encodeURIComponent(u)),s=n+a+1,u=""),a&&(n+=a,a=0)}return t.join("")+e.slice(s)}function Xt(e,t,n,s){const a=s?s-1:Number.POSITIVE_INFINITY;let o=0;return u;function u(d){return $t(d)?(e.enter(n),c(d)):t(d)}function c(d){return $t(d)&&o++<a?(e.consume(d),c):(e.exit(n),t(d))}}const SV={tokenize:_V};function _V(e){const t=e.attempt(this.parser.constructs.contentInitial,s,a);let n;return t;function s(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Xt(e,t,"linePrefix")}function a(c){return e.enter("paragraph"),o(c)}function o(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return bt(c)?(e.consume(c),e.exit("chunkText"),o):(e.consume(c),u)}}const wV={tokenize:CV},Ck={tokenize:NV};function CV(e){const t=this,n=[];let s=0,a,o,u;return c;function c(_){if(s<n.length){const N=n[s];return t.containerState=N[1],e.attempt(N[0].continuation,d,h)(_)}return h(_)}function d(_){if(s++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&E();const N=t.events.length;let A=N,k;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){k=t.events[A][1].end;break}y(s);let I=N;for(;I<t.events.length;)t.events[I][1].end={...k},I++;return hs(t.events,A+1,0,t.events.slice(N)),t.events.length=I,h(_)}return c(_)}function h(_){if(s===n.length){if(!a)return g(_);if(a.currentConstruct&&a.currentConstruct.concrete)return C(_);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ck,p,m)(_)}function p(_){return a&&E(),y(s),g(_)}function m(_){return t.parser.lazy[t.now().line]=s!==n.length,u=t.now().offset,C(_)}function g(_){return t.containerState={},e.attempt(Ck,v,C)(_)}function v(_){return s++,n.push([t.currentConstruct,t.containerState]),g(_)}function C(_){if(_===null){a&&E(),y(0),e.consume(_);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:o}),S(_)}function S(_){if(_===null){b(e.exit("chunkFlow"),!0),y(0),e.consume(_);return}return bt(_)?(e.consume(_),b(e.exit("chunkFlow")),s=0,t.interrupt=void 0,c):(e.consume(_),S)}function b(_,N){const A=t.sliceStream(_);if(N&&A.push(null),_.previous=o,o&&(o.next=_),o=_,a.defineSkip(_.start),a.write(A),t.parser.lazy[_.start.line]){let k=a.events.length;for(;k--;)if(a.events[k][1].start.offset<u&&(!a.events[k][1].end||a.events[k][1].end.offset>u))return;const I=t.events.length;let R=I,M,L;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(M){L=t.events[R][1].end;break}M=!0}for(y(s),k=I;k<t.events.length;)t.events[k][1].end={...L},k++;hs(t.events,R+1,0,t.events.slice(I)),t.events.length=k}}function y(_){let N=n.length;for(;N-- >_;){const A=n[N];t.containerState=A[1],A[0].exit.call(t,e)}n.length=_}function E(){a.write([null]),o=void 0,a=void 0,t.containerState._closeFlow=void 0}}function NV(e,t,n){return Xt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ec(e){if(e===null||gn(e)||Co(e))return 1;if(Nm(e))return 2}function Tm(e,t,n){const s=[];let a=-1;for(;++a<e.length;){const o=e[a].resolveAll;o&&!s.includes(o)&&(t=o(t,n),s.push(o))}return t}const lv={name:"attention",resolveAll:TV,tokenize:AV};function TV(e,t){let n=-1,s,a,o,u,c,d,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(s=n;s--;)if(e[s][0]==="exit"&&e[s][1].type==="attentionSequence"&&e[s][1]._open&&t.sliceSerialize(e[s][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[s][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[s][1].end.offset-e[s][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[s][1].end.offset-e[s][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[s][1].end},g={...e[n][1].start};Nk(m,-d),Nk(g,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:{...e[s][1].end}},c={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:g},o={type:d>1?"strongText":"emphasisText",start:{...e[s][1].end},end:{...e[n][1].start}},a={type:d>1?"strong":"emphasis",start:{...u.start},end:{...c.end}},e[s][1].end={...u.start},e[n][1].start={...c.end},h=[],e[s][1].end.offset-e[s][1].start.offset&&(h=Ss(h,[["enter",e[s][1],t],["exit",e[s][1],t]])),h=Ss(h,[["enter",a,t],["enter",u,t],["exit",u,t],["enter",o,t]]),h=Ss(h,Tm(t.parser.constructs.insideSpan.null,e.slice(s+1,n),t)),h=Ss(h,[["exit",o,t],["enter",c,t],["exit",c,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=Ss(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,hs(e,s-1,n-s+3,h),n=s+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function AV(e,t){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,a=ec(s);let o;return u;function u(d){return o=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===o)return e.consume(d),c;const h=e.exit("attentionSequence"),p=ec(d),m=!p||p===2&&a||n.includes(d),g=!a||a===2&&p||n.includes(s);return h._open=!!(o===42?m:m&&(a||!g)),h._close=!!(o===42?g:g&&(p||!m)),t(d)}}function Nk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const kV={name:"autolink",tokenize:RV};function RV(e,t,n){let s=0;return a;function a(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return Or(v)?(e.consume(v),u):v===64?n(v):h(v)}function u(v){return v===43||v===45||v===46||Ar(v)?(s=1,c(v)):h(v)}function c(v){return v===58?(e.consume(v),s=0,d):(v===43||v===45||v===46||Ar(v))&&s++<32?(e.consume(v),c):(s=0,h(v))}function d(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Ap(v)?n(v):(e.consume(v),d)}function h(v){return v===64?(e.consume(v),p):vV(v)?(e.consume(v),h):n(v)}function p(v){return Ar(v)?m(v):n(v)}function m(v){return v===46?(e.consume(v),s=0,p):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):g(v)}function g(v){if((v===45||Ar(v))&&s++<63){const C=v===45?g:m;return e.consume(v),C}return n(v)}}const zd={partial:!0,tokenize:DV};function DV(e,t,n){return s;function s(o){return $t(o)?Xt(e,a,"linePrefix")(o):a(o)}function a(o){return o===null||bt(o)?t(o):n(o)}}const q3={continuation:{tokenize:jV},exit:OV,name:"blockQuote",tokenize:IV};function IV(e,t,n){const s=this;return a;function a(u){if(u===62){const c=s.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),o}return n(u)}function o(u){return $t(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function jV(e,t,n){const s=this;return a;function a(u){return $t(u)?Xt(e,o,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):o(u)}function o(u){return e.attempt(q3,t,n)(u)}}function OV(e){e.exit("blockQuote")}const W3={name:"characterEscape",tokenize:LV};function LV(e,t,n){return s;function s(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),a}function a(o){return EV(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const V3={name:"characterReference",tokenize:MV};function MV(e,t,n){const s=this;let a=0,o,u;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,u=Ar,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,u=yV,p):(e.enter("characterReferenceValue"),o=7,u=ov,p(m))}function p(m){if(m===59&&a){const g=e.exit("characterReferenceValue");return u===Ar&&!Ed(s.sliceSerialize(g))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&a++<o?(e.consume(m),p):n(m)}}const Tk={partial:!0,tokenize:PV},Ak={concrete:!0,name:"codeFenced",tokenize:FV};function FV(e,t,n){const s=this,a={partial:!0,tokenize:A};let o=0,u=0,c;return d;function d(k){return h(k)}function h(k){const I=s.events[s.events.length-1];return o=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,c=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(k)}function p(k){return k===c?(u++,e.consume(k),p):u<3?n(k):(e.exit("codeFencedFenceSequence"),$t(k)?Xt(e,m,"whitespace")(k):m(k))}function m(k){return k===null||bt(k)?(e.exit("codeFencedFence"),s.interrupt?t(k):e.check(Tk,S,N)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),g(k))}function g(k){return k===null||bt(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(k)):$t(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Xt(e,v,"whitespace")(k)):k===96&&k===c?n(k):(e.consume(k),g)}function v(k){return k===null||bt(k)?m(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),C(k))}function C(k){return k===null||bt(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(k)):k===96&&k===c?n(k):(e.consume(k),C)}function S(k){return e.attempt(a,N,b)(k)}function b(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),y}function y(k){return o>0&&$t(k)?Xt(e,E,"linePrefix",o+1)(k):E(k)}function E(k){return k===null||bt(k)?e.check(Tk,S,N)(k):(e.enter("codeFlowValue"),_(k))}function _(k){return k===null||bt(k)?(e.exit("codeFlowValue"),E(k)):(e.consume(k),_)}function N(k){return e.exit("codeFenced"),t(k)}function A(k,I,R){let M=0;return L;function L(Q){return k.enter("lineEnding"),k.consume(Q),k.exit("lineEnding"),$}function $(Q){return k.enter("codeFencedFence"),$t(Q)?Xt(k,H,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):H(Q)}function H(Q){return Q===c?(k.enter("codeFencedFenceSequence"),B(Q)):R(Q)}function B(Q){return Q===c?(M++,k.consume(Q),B):M>=u?(k.exit("codeFencedFenceSequence"),$t(Q)?Xt(k,z,"whitespace")(Q):z(Q)):R(Q)}function z(Q){return Q===null||bt(Q)?(k.exit("codeFencedFence"),I(Q)):R(Q)}}}function PV(e,t,n){const s=this;return a;function a(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o)}function o(u){return s.parser.lazy[s.now().line]?n(u):t(u)}}const qx={name:"codeIndented",tokenize:UV},BV={partial:!0,tokenize:HV};function UV(e,t,n){const s=this;return a;function a(h){return e.enter("codeIndented"),Xt(e,o,"linePrefix",5)(h)}function o(h){const p=s.events[s.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?d(h):bt(h)?e.attempt(BV,u,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||bt(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function HV(e,t,n){const s=this;return a;function a(u){return s.parser.lazy[s.now().line]?n(u):bt(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):Xt(e,o,"linePrefix",5)(u)}function o(u){const c=s.events[s.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):bt(u)?a(u):n(u)}}const $V={name:"codeText",previous:GV,resolve:zV,tokenize:qV};function zV(e){let t=e.length-4,n=3,s,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(s=n;++s<t;)if(e[s][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(s=n-1,t++;++s<=t;)a===void 0?s!==t&&e[s][1].type!=="lineEnding"&&(a=s):(s===t||e[s][1].type==="lineEnding")&&(e[a][1].type="codeTextData",s!==a+2&&(e[a][1].end=e[s-1][1].end,e.splice(a+2,s-a-2),t-=s-a-2,s=a+2),a=void 0);return e}function GV(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function qV(e,t,n){let s=0,a,o;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),s++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(o=e.enter("codeTextSequence"),a=0,p(m)):bt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||bt(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),a++,p):a===s?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",h(m))}}class WV{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const s=n??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(t,s):t>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(t,n,s){const a=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return s&&Mu(this.left,s),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Mu(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Mu(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Mu(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Mu(this.left,n.reverse())}}}function Mu(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Y3(e){const t={};let n=-1,s,a,o,u,c,d,h;const p=new WV(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(s=p.get(n),n&&s[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=s[1]._tokenizer.events,o=0,o<d.length&&d[o][1].type==="lineEndingBlank"&&(o+=2),o<d.length&&d[o][1].type==="content"))for(;++o<d.length&&d[o][1].type!=="content";)d[o][1].type==="chunkText"&&(d[o][1]._isInFirstContentOfListItem=!0,o++);if(s[0]==="enter")s[1].contentType&&(Object.assign(t,VV(p,n)),n=t[n],h=!0);else if(s[1]._container){for(o=n,a=void 0;o--;)if(u=p.get(o),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(a&&(p.get(a)[1].type="lineEndingBlank"),u[1].type="lineEnding",a=o);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;a&&(s[1].end={...p.get(a)[1].start},c=p.slice(a,n),c.unshift(s),p.splice(a,n-a+1,c))}}return hs(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function VV(e,t){const n=e.get(t)[1],s=e.get(t)[2];let a=t-1;const o=[];let u=n._tokenizer;u||(u=s.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],h={};let p,m,g=-1,v=n,C=0,S=0;const b=[S];for(;v;){for(;e.get(++a)[1]!==v;);o.push(a),v._tokenizer||(p=s.sliceStream(v),v.next||p.push(null),m&&u.defineSkip(v.start),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),v._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=v,v=v.next}for(v=n;++g<c.length;)c[g][0]==="exit"&&c[g-1][0]==="enter"&&c[g][1].type===c[g-1][1].type&&c[g][1].start.line!==c[g][1].end.line&&(S=g+1,b.push(S),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(u.events=[],v?(v._tokenizer=void 0,v.previous=void 0):b.pop(),g=b.length;g--;){const y=c.slice(b[g],b[g+1]),E=o.pop();d.push([E,E+y.length-1]),e.splice(E,2,y)}for(d.reverse(),g=-1;++g<d.length;)h[C+d[g][0]]=C+d[g][1],C+=d[g][1]-d[g][0]-1;return h}const YV={resolve:XV,tokenize:ZV},KV={partial:!0,tokenize:QV};function XV(e){return Y3(e),e}function ZV(e,t){let n;return s;function s(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(c)}function a(c){return c===null?o(c):bt(c)?e.check(KV,u,o)(c):(e.consume(c),a)}function o(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function QV(e,t,n){const s=this;return a;function a(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Xt(e,o,"linePrefix")}function o(u){if(u===null||bt(u))return n(u);const c=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(s.parser.constructs.flow,n,t)(u)}}function K3(e,t,n,s,a,o,u,c,d){const h=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(y){return y===60?(e.enter(s),e.enter(a),e.enter(o),e.consume(y),e.exit(o),g):y===null||y===32||y===41||Ap(y)?n(y):(e.enter(s),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(y))}function g(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(a),e.exit(s),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),v(y))}function v(y){return y===62?(e.exit("chunkString"),e.exit(c),g(y)):y===null||y===60||bt(y)?n(y):(e.consume(y),y===92?C:v)}function C(y){return y===60||y===62||y===92?(e.consume(y),v):v(y)}function S(y){return!p&&(y===null||y===41||gn(y))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(s),t(y)):p<h&&y===40?(e.consume(y),p++,S):y===41?(e.consume(y),p--,S):y===null||y===32||y===40||Ap(y)?n(y):(e.consume(y),y===92?b:S)}function b(y){return y===40||y===41||y===92?(e.consume(y),S):S(y)}}function X3(e,t,n,s,a,o){const u=this;let c=0,d;return h;function h(v){return e.enter(s),e.enter(a),e.consume(v),e.exit(a),e.enter(o),p}function p(v){return c>999||v===null||v===91||v===93&&!d||v===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(v):v===93?(e.exit(o),e.enter(a),e.consume(v),e.exit(a),e.exit(s),t):bt(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(v))}function m(v){return v===null||v===91||v===93||bt(v)||c++>999?(e.exit("chunkString"),p(v)):(e.consume(v),d||(d=!$t(v)),v===92?g:m)}function g(v){return v===91||v===92||v===93?(e.consume(v),c++,m):m(v)}}function Z3(e,t,n,s,a,o){let u;return c;function c(g){return g===34||g===39||g===40?(e.enter(s),e.enter(a),e.consume(g),e.exit(a),u=g===40?41:g,d):n(g)}function d(g){return g===u?(e.enter(a),e.consume(g),e.exit(a),e.exit(s),t):(e.enter(o),h(g))}function h(g){return g===u?(e.exit(o),d(u)):g===null?n(g):bt(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),Xt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===u||g===null||bt(g)?(e.exit("chunkString"),h(g)):(e.consume(g),g===92?m:p)}function m(g){return g===u||g===92?(e.consume(g),p):p(g)}}function Zu(e,t){let n;return s;function s(a){return bt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,s):$t(a)?Xt(e,s,n?"linePrefix":"lineSuffix")(a):t(a)}}const JV={name:"definition",tokenize:tY},eY={partial:!0,tokenize:nY};function tY(e,t,n){const s=this;let a;return o;function o(v){return e.enter("definition"),u(v)}function u(v){return X3.call(s,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function c(v){return a=Fs(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),d):n(v)}function d(v){return gn(v)?Zu(e,h)(v):h(v)}function h(v){return K3(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function p(v){return e.attempt(eY,m,m)(v)}function m(v){return $t(v)?Xt(e,g,"whitespace")(v):g(v)}function g(v){return v===null||bt(v)?(e.exit("definition"),s.parser.defined.push(a),t(v)):n(v)}}function nY(e,t,n){return s;function s(c){return gn(c)?Zu(e,a)(c):n(c)}function a(c){return Z3(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function o(c){return $t(c)?Xt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||bt(c)?t(c):n(c)}}const rY={name:"hardBreakEscape",tokenize:sY};function sY(e,t,n){return s;function s(o){return e.enter("hardBreakEscape"),e.consume(o),a}function a(o){return bt(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const aY={name:"headingAtx",resolve:iY,tokenize:oY};function iY(e,t){let n=e.length-2,s=3,a,o;return e[s][1].type==="whitespace"&&(s+=2),n-2>s&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(s===n-1||n-4>s&&e[n-2][1].type==="whitespace")&&(n-=s+1===n?2:4),n>s&&(a={type:"atxHeadingText",start:e[s][1].start,end:e[n][1].end},o={type:"chunkText",start:e[s][1].start,end:e[n][1].end,contentType:"text"},hs(e,s,n-s+1,[["enter",a,t],["enter",o,t],["exit",o,t],["exit",a,t]])),e}function oY(e,t,n){let s=0;return a;function a(p){return e.enter("atxHeading"),o(p)}function o(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&s++<6?(e.consume(p),u):p===null||gn(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||bt(p)?(e.exit("atxHeading"),t(p)):$t(p)?Xt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||gn(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const lY=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],kk=["pre","script","style","textarea"],cY={concrete:!0,name:"htmlFlow",resolveTo:hY,tokenize:fY},uY={partial:!0,tokenize:mY},dY={partial:!0,tokenize:pY};function hY(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function fY(e,t,n){const s=this;let a,o,u,c,d;return h;function h(U){return p(U)}function p(U){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(U),m}function m(U){return U===33?(e.consume(U),g):U===47?(e.consume(U),o=!0,S):U===63?(e.consume(U),a=3,s.interrupt?t:O):Or(U)?(e.consume(U),u=String.fromCharCode(U),b):n(U)}function g(U){return U===45?(e.consume(U),a=2,v):U===91?(e.consume(U),a=5,c=0,C):Or(U)?(e.consume(U),a=4,s.interrupt?t:O):n(U)}function v(U){return U===45?(e.consume(U),s.interrupt?t:O):n(U)}function C(U){const W="CDATA[";return U===W.charCodeAt(c++)?(e.consume(U),c===W.length?s.interrupt?t:H:C):n(U)}function S(U){return Or(U)?(e.consume(U),u=String.fromCharCode(U),b):n(U)}function b(U){if(U===null||U===47||U===62||gn(U)){const W=U===47,ae=u.toLowerCase();return!W&&!o&&kk.includes(ae)?(a=1,s.interrupt?t(U):H(U)):lY.includes(u.toLowerCase())?(a=6,W?(e.consume(U),y):s.interrupt?t(U):H(U)):(a=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(U):o?E(U):_(U))}return U===45||Ar(U)?(e.consume(U),u+=String.fromCharCode(U),b):n(U)}function y(U){return U===62?(e.consume(U),s.interrupt?t:H):n(U)}function E(U){return $t(U)?(e.consume(U),E):L(U)}function _(U){return U===47?(e.consume(U),L):U===58||U===95||Or(U)?(e.consume(U),N):$t(U)?(e.consume(U),_):L(U)}function N(U){return U===45||U===46||U===58||U===95||Ar(U)?(e.consume(U),N):A(U)}function A(U){return U===61?(e.consume(U),k):$t(U)?(e.consume(U),A):_(U)}function k(U){return U===null||U===60||U===61||U===62||U===96?n(U):U===34||U===39?(e.consume(U),d=U,I):$t(U)?(e.consume(U),k):R(U)}function I(U){return U===d?(e.consume(U),d=null,M):U===null||bt(U)?n(U):(e.consume(U),I)}function R(U){return U===null||U===34||U===39||U===47||U===60||U===61||U===62||U===96||gn(U)?A(U):(e.consume(U),R)}function M(U){return U===47||U===62||$t(U)?_(U):n(U)}function L(U){return U===62?(e.consume(U),$):n(U)}function $(U){return U===null||bt(U)?H(U):$t(U)?(e.consume(U),$):n(U)}function H(U){return U===45&&a===2?(e.consume(U),P):U===60&&a===1?(e.consume(U),X):U===62&&a===4?(e.consume(U),V):U===63&&a===3?(e.consume(U),O):U===93&&a===5?(e.consume(U),F):bt(U)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(uY,te,B)(U)):U===null||bt(U)?(e.exit("htmlFlowData"),B(U)):(e.consume(U),H)}function B(U){return e.check(dY,z,te)(U)}function z(U){return e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),Q}function Q(U){return U===null||bt(U)?B(U):(e.enter("htmlFlowData"),H(U))}function P(U){return U===45?(e.consume(U),O):H(U)}function X(U){return U===47?(e.consume(U),u="",Y):H(U)}function Y(U){if(U===62){const W=u.toLowerCase();return kk.includes(W)?(e.consume(U),V):H(U)}return Or(U)&&u.length<8?(e.consume(U),u+=String.fromCharCode(U),Y):H(U)}function F(U){return U===93?(e.consume(U),O):H(U)}function O(U){return U===62?(e.consume(U),V):U===45&&a===2?(e.consume(U),O):H(U)}function V(U){return U===null||bt(U)?(e.exit("htmlFlowData"),te(U)):(e.consume(U),V)}function te(U){return e.exit("htmlFlow"),t(U)}}function pY(e,t,n){const s=this;return a;function a(u){return bt(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):n(u)}function o(u){return s.parser.lazy[s.now().line]?n(u):t(u)}}function mY(e,t,n){return s;function s(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(zd,t,n)}}const gY={name:"htmlText",tokenize:bY};function bY(e,t,n){const s=this;let a,o,u;return c;function c(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),A):O===63?(e.consume(O),_):Or(O)?(e.consume(O),R):n(O)}function h(O){return O===45?(e.consume(O),p):O===91?(e.consume(O),o=0,C):Or(O)?(e.consume(O),E):n(O)}function p(O){return O===45?(e.consume(O),v):n(O)}function m(O){return O===null?n(O):O===45?(e.consume(O),g):bt(O)?(u=m,X(O)):(e.consume(O),m)}function g(O){return O===45?(e.consume(O),v):m(O)}function v(O){return O===62?P(O):O===45?g(O):m(O)}function C(O){const V="CDATA[";return O===V.charCodeAt(o++)?(e.consume(O),o===V.length?S:C):n(O)}function S(O){return O===null?n(O):O===93?(e.consume(O),b):bt(O)?(u=S,X(O)):(e.consume(O),S)}function b(O){return O===93?(e.consume(O),y):S(O)}function y(O){return O===62?P(O):O===93?(e.consume(O),y):S(O)}function E(O){return O===null||O===62?P(O):bt(O)?(u=E,X(O)):(e.consume(O),E)}function _(O){return O===null?n(O):O===63?(e.consume(O),N):bt(O)?(u=_,X(O)):(e.consume(O),_)}function N(O){return O===62?P(O):_(O)}function A(O){return Or(O)?(e.consume(O),k):n(O)}function k(O){return O===45||Ar(O)?(e.consume(O),k):I(O)}function I(O){return bt(O)?(u=I,X(O)):$t(O)?(e.consume(O),I):P(O)}function R(O){return O===45||Ar(O)?(e.consume(O),R):O===47||O===62||gn(O)?M(O):n(O)}function M(O){return O===47?(e.consume(O),P):O===58||O===95||Or(O)?(e.consume(O),L):bt(O)?(u=M,X(O)):$t(O)?(e.consume(O),M):P(O)}function L(O){return O===45||O===46||O===58||O===95||Ar(O)?(e.consume(O),L):$(O)}function $(O){return O===61?(e.consume(O),H):bt(O)?(u=$,X(O)):$t(O)?(e.consume(O),$):M(O)}function H(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),a=O,B):bt(O)?(u=H,X(O)):$t(O)?(e.consume(O),H):(e.consume(O),z)}function B(O){return O===a?(e.consume(O),a=void 0,Q):O===null?n(O):bt(O)?(u=B,X(O)):(e.consume(O),B)}function z(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||gn(O)?M(O):(e.consume(O),z)}function Q(O){return O===47||O===62||gn(O)?M(O):n(O)}function P(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function X(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Y}function Y(O){return $t(O)?Xt(e,F,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):F(O)}function F(O){return e.enter("htmlTextData"),u(O)}}const Gy={name:"labelEnd",resolveAll:EY,resolveTo:SY,tokenize:_Y},xY={tokenize:wY},vY={tokenize:CY},yY={tokenize:NY};function EY(e){let t=-1;const n=[];for(;++t<e.length;){const s=e[t][1];if(n.push(e[t]),s.type==="labelImage"||s.type==="labelLink"||s.type==="labelEnd"){const a=s.type==="labelImage"?4:2;s.type="data",t+=a}}return e.length!==n.length&&hs(e,0,e.length,n),e}function SY(e,t){let n=e.length,s=0,a,o,u,c;for(;n--;)if(a=e[n][1],o){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(o=n,a.type!=="labelLink")){s=2;break}}else a.type==="labelEnd"&&(u=n);const d={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[u][1].end}},p={type:"labelText",start:{...e[o+s+2][1].end},end:{...e[u-2][1].start}};return c=[["enter",d,t],["enter",h,t]],c=Ss(c,e.slice(o+1,o+s+3)),c=Ss(c,[["enter",p,t]]),c=Ss(c,Tm(t.parser.constructs.insideSpan.null,e.slice(o+s+4,u-3),t)),c=Ss(c,[["exit",p,t],e[u-2],e[u-1],["exit",h,t]]),c=Ss(c,e.slice(u+1)),c=Ss(c,[["exit",d,t]]),hs(e,o,e.length,c),e}function _Y(e,t,n){const s=this;let a=s.events.length,o,u;for(;a--;)if((s.events[a][1].type==="labelImage"||s.events[a][1].type==="labelLink")&&!s.events[a][1]._balanced){o=s.events[a][1];break}return c;function c(g){return o?o._inactive?m(g):(u=s.parser.defined.includes(Fs(s.sliceSerialize({start:o.end,end:s.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(g),e.exit("labelMarker"),e.exit("labelEnd"),d):n(g)}function d(g){return g===40?e.attempt(xY,p,u?p:m)(g):g===91?e.attempt(vY,p,u?h:m)(g):u?p(g):m(g)}function h(g){return e.attempt(yY,p,m)(g)}function p(g){return t(g)}function m(g){return o._balanced=!0,n(g)}}function wY(e,t,n){return s;function s(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),a}function a(m){return gn(m)?Zu(e,o)(m):o(m)}function o(m){return m===41?p(m):K3(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return gn(m)?Zu(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?Z3(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return gn(m)?Zu(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function CY(e,t,n){const s=this;return a;function a(c){return X3.call(s,e,o,u,"reference","referenceMarker","referenceString")(c)}function o(c){return s.parser.defined.includes(Fs(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function NY(e,t,n){return s;function s(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),a}function a(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const TY={name:"labelStartImage",resolveAll:Gy.resolveAll,tokenize:AY};function AY(e,t,n){const s=this;return a;function a(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),o}function o(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(c):t(c)}}const kY={name:"labelStartLink",resolveAll:Gy.resolveAll,tokenize:RY};function RY(e,t,n){const s=this;return a;function a(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),o}function o(u){return u===94&&"_hiddenFootnoteSupport"in s.parser.constructs?n(u):t(u)}}const Wx={name:"lineEnding",tokenize:DY};function DY(e,t){return n;function n(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Xt(e,t,"linePrefix")}}const ip={name:"thematicBreak",tokenize:IY};function IY(e,t,n){let s=0,a;return o;function o(h){return e.enter("thematicBreak"),u(h)}function u(h){return a=h,c(h)}function c(h){return h===a?(e.enter("thematicBreakSequence"),d(h)):s>=3&&(h===null||bt(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===a?(e.consume(h),s++,d):(e.exit("thematicBreakSequence"),$t(h)?Xt(e,c,"whitespace")(h):c(h))}}const Wr={continuation:{tokenize:MY},exit:PY,name:"list",tokenize:LY},jY={partial:!0,tokenize:BY},OY={partial:!0,tokenize:FY};function LY(e,t,n){const s=this,a=s.events[s.events.length-1];let o=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,u=0;return c;function c(v){const C=s.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(C==="listUnordered"?!s.containerState.marker||v===s.containerState.marker:ov(v)){if(s.containerState.type||(s.containerState.type=C,e.enter(C,{_container:!0})),C==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(ip,n,h)(v):h(v);if(!s.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(v)}return n(v)}function d(v){return ov(v)&&++u<10?(e.consume(v),d):(!s.interrupt||u<2)&&(s.containerState.marker?v===s.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),h(v)):n(v)}function h(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),s.containerState.marker=s.containerState.marker||v,e.check(zd,s.interrupt?n:p,e.attempt(jY,g,m))}function p(v){return s.containerState.initialBlankLine=!0,o++,g(v)}function m(v){return $t(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),g):n(v)}function g(v){return s.containerState.size=o+s.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function MY(e,t,n){const s=this;return s.containerState._closeFlow=void 0,e.check(zd,a,o);function a(c){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,Xt(e,t,"listItemIndent",s.containerState.size+1)(c)}function o(c){return s.containerState.furtherBlankLines||!$t(c)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,u(c)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,e.attempt(OY,t,u)(c))}function u(c){return s.containerState._closeFlow=!0,s.interrupt=void 0,Xt(e,e.attempt(Wr,t,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function FY(e,t,n){const s=this;return Xt(e,a,"listItemIndent",s.containerState.size+1);function a(o){const u=s.events[s.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===s.containerState.size?t(o):n(o)}}function PY(e){e.exit(this.containerState.type)}function BY(e,t,n){const s=this;return Xt(e,a,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(o){const u=s.events[s.events.length-1];return!$t(o)&&u&&u[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Rk={name:"setextUnderline",resolveTo:UY,tokenize:HY};function UY(e,t){let n=e.length,s,a,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){s=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const u={type:"setextHeading",start:{...e[s][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",o?(e.splice(a,0,["enter",u,t]),e.splice(o+1,0,["exit",e[s][1],t]),e[s][1].end={...e[o][1].end}):e[s][1]=u,e.push(["exit",u,t]),e}function HY(e,t,n){const s=this;let a;return o;function o(h){let p=s.events.length,m;for(;p--;)if(s.events[p][1].type!=="lineEnding"&&s.events[p][1].type!=="linePrefix"&&s.events[p][1].type!=="content"){m=s.events[p][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||m)?(e.enter("setextHeadingLine"),a=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===a?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),$t(h)?Xt(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||bt(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const $Y={tokenize:zY};function zY(e){const t=this,n=e.attempt(zd,s,e.attempt(this.parser.constructs.flowInitial,a,Xt(e,e.attempt(this.parser.constructs.flow,a,e.attempt(YV,a)),"linePrefix")));return n;function s(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const GY={resolveAll:J3()},qY=Q3("string"),WY=Q3("text");function Q3(e){return{resolveAll:J3(e==="text"?VY:void 0),tokenize:t};function t(n){const s=this,a=this.parser.constructs[e],o=n.attempt(a,u,c);return u;function u(p){return h(p)?o(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return h(p)?(n.exit("data"),o(p)):(n.consume(p),d)}function h(p){if(p===null)return!0;const m=a[p];let g=-1;if(m)for(;++g<m.length;){const v=m[g];if(!v.previous||v.previous.call(s,s.previous))return!0}return!1}}}function J3(e){return t;function t(n,s){let a=-1,o;for(;++a<=n.length;)o===void 0?n[a]&&n[a][1].type==="data"&&(o=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==o+2&&(n[o][1].end=n[a-1][1].end,n.splice(o+2,a-o-2),a=o+2),o=void 0);return e?e(n,s):n}}function VY(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const s=e[n-1][1],a=t.sliceStream(s);let o=a.length,u=-1,c=0,d;for(;o--;){const h=a[o];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(h===-2)d=!0,c++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?u:s.start._bufferIndex+u,_index:s.start._index+o,line:s.end.line,column:s.end.column-c,offset:s.end.offset-c},end:{...s.end}};s.end={...h.start},s.start.offset===s.end.offset?Object.assign(s,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const YY={42:Wr,43:Wr,45:Wr,48:Wr,49:Wr,50:Wr,51:Wr,52:Wr,53:Wr,54:Wr,55:Wr,56:Wr,57:Wr,62:q3},KY={91:JV},XY={[-2]:qx,[-1]:qx,32:qx},ZY={35:aY,42:ip,45:[Rk,ip],60:cY,61:Rk,95:ip,96:Ak,126:Ak},QY={38:V3,92:W3},JY={[-5]:Wx,[-4]:Wx,[-3]:Wx,33:TY,38:V3,42:lv,60:[kV,gY],91:kY,92:[rY,W3],93:Gy,95:lv,96:$V},eK={null:[lv,GY]},tK={null:[42,95]},nK={null:[]},rK=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:tK,contentInitial:KY,disable:nK,document:YY,flow:ZY,flowInitial:XY,insideSpan:eK,string:QY,text:JY},Symbol.toStringTag,{value:"Module"}));function sK(e,t,n){let s={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},o=[];let u=[],c=[];const d={attempt:I(A),check:I(k),consume:E,enter:_,exit:N,interrupt:I(k,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:C,parser:e,previous:null,sliceSerialize:g,sliceStream:v,write:m};let p=t.tokenize.call(h,d);return t.resolveAll&&o.push(t),h;function m($){return u=Ss(u,$),b(),u[u.length-1]!==null?[]:(R(t,0),h.events=Tm(o,h.events,h),h.events)}function g($,H){return iK(v($),H)}function v($){return aK(u,$)}function C(){const{_bufferIndex:$,_index:H,line:B,column:z,offset:Q}=s;return{_bufferIndex:$,_index:H,line:B,column:z,offset:Q}}function S($){a[$.line]=$.column,L()}function b(){let $;for(;s._index<u.length;){const H=u[s._index];if(typeof H=="string")for($=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===$&&s._bufferIndex<H.length;)y(H.charCodeAt(s._bufferIndex));else y(H)}}function y($){p=p($)}function E($){bt($)?(s.line++,s.column=1,s.offset+=$===-3?2:1,L()):$!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===u[s._index].length&&(s._bufferIndex=-1,s._index++)),h.previous=$}function _($,H){const B=H||{};return B.type=$,B.start=C(),h.events.push(["enter",B,h]),c.push(B),B}function N($){const H=c.pop();return H.end=C(),h.events.push(["exit",H,h]),H}function A($,H){R($,H.from)}function k($,H){H.restore()}function I($,H){return B;function B(z,Q,P){let X,Y,F,O;return Array.isArray(z)?te(z):"tokenize"in z?te([z]):V(z);function V(se){return K;function K(G){const Z=G!==null&&se[G],ce=G!==null&&se.null,le=[...Array.isArray(Z)?Z:Z?[Z]:[],...Array.isArray(ce)?ce:ce?[ce]:[]];return te(le)(G)}}function te(se){return X=se,Y=0,se.length===0?P:U(se[Y])}function U(se){return K;function K(G){return O=M(),F=se,se.partial||(h.currentConstruct=se),se.name&&h.parser.constructs.disable.null.includes(se.name)?ae():se.tokenize.call(H?Object.assign(Object.create(h),H):h,d,W,ae)(G)}}function W(se){return $(F,O),Q}function ae(se){return O.restore(),++Y<X.length?U(X[Y]):P}}}function R($,H){$.resolveAll&&!o.includes($)&&o.push($),$.resolve&&hs(h.events,H,h.events.length-H,$.resolve(h.events.slice(H),h)),$.resolveTo&&(h.events=$.resolveTo(h.events,h))}function M(){const $=C(),H=h.previous,B=h.currentConstruct,z=h.events.length,Q=Array.from(c);return{from:z,restore:P};function P(){s=$,h.previous=H,h.currentConstruct=B,h.events.length=z,c=Q,L()}}function L(){s.line in a&&s.column<2&&(s.column=a[s.line],s.offset+=a[s.line]-1)}}function aK(e,t){const n=t.start._index,s=t.start._bufferIndex,a=t.end._index,o=t.end._bufferIndex;let u;if(n===a)u=[e[n].slice(s,o)];else{if(u=e.slice(n,a),s>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(s):u.shift()}o>0&&u.push(e[a].slice(0,o))}return u}function iK(e,t){let n=-1;const s=[];let a;for(;++n<e.length;){const o=e[n];let u;if(typeof o=="string")u=o;else switch(o){case-5:{u="\r";break}case-4:{u=`
|
|
656
656
|
`;break}case-3:{u=`\r
|
|
657
657
|
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&a)continue;u=" ";break}default:u=String.fromCharCode(o)}a=o===-2,s.push(u)}return s.join("")}function oK(e){const s={constructs:z3([rK,...(e||{}).extensions||[]]),content:a(SV),defined:[],document:a(wV),flow:a($Y),lazy:{},string:a(qY),text:a(WY)};return s;function a(o){return u;function u(c){return sK(s,o,c)}}}function lK(e){for(;!Y3(e););return e}const Dk=/[\0\t\n\r]/g;function cK(){let e=1,t="",n=!0,s;return a;function a(o,u,c){const d=[];let h,p,m,g,v;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(u||void 0).decode(o)),m=0,t="",n&&(o.charCodeAt(0)===65279&&m++,n=void 0);m<o.length;){if(Dk.lastIndex=m,h=Dk.exec(o),g=h&&h.index!==void 0?h.index:o.length,v=o.charCodeAt(g),!h){t=o.slice(m);break}if(v===10&&m===g&&s)d.push(-3),s=void 0;else switch(s&&(d.push(-5),s=void 0),m<g&&(d.push(o.slice(m,g)),e+=g-m),v){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:s=!0,e=1}m=g+1}return c&&(s&&d.push(-5),t&&d.push(t),d.push(null)),d}}const uK=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function dK(e){return e.replace(uK,hK)}function hK(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),o=a===120||a===88;return G3(n.slice(o?2:1),o?16:10)}return Ed(n)||e}const eL={}.hasOwnProperty;function fK(e,t,n){return typeof t!="string"&&(n=t,t=void 0),pK(n)(lK(oK(n).document().write(cK()(e,t,!0))))}function pK(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(At),autolinkProtocol:M,autolinkEmail:M,atxHeading:o(Ge),blockQuote:o(ce),characterEscape:M,characterReference:M,codeFenced:o(le),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:o(le,u),codeText:o(ne,u),codeTextData:M,data:M,codeFlowValue:M,definition:o(pe),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:o(ye),hardBreakEscape:o(Ke),hardBreakTrailing:o(Ke),htmlFlow:o(Re,u),htmlFlowData:M,htmlText:o(Re,u),htmlTextData:M,image:o(Lt),label:u,link:o(At),listItem:o(Xe),listItemValue:g,listOrdered:o(Ct,m),listUnordered:o(Ct),paragraph:o(Qe),reference:U,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:o(Ge),strong:o(vt),thematicBreak:o(ke)},exit:{atxHeading:d(),atxHeadingSequence:A,autolink:d(),autolinkEmail:Z,autolinkProtocol:G,blockQuote:d(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:se,characterReference:K,codeFenced:d(b),codeFencedFence:S,codeFencedFenceInfo:v,codeFencedFenceMeta:C,codeFlowValue:L,codeIndented:d(y),codeText:d(Q),codeTextData:L,data:L,definition:d(),definitionDestinationString:N,definitionLabelString:E,definitionTitleString:_,emphasis:d(),hardBreakEscape:d(H),hardBreakTrailing:d(H),htmlFlow:d(B),htmlFlowData:L,htmlText:d(z),htmlTextData:L,image:d(X),label:F,labelText:Y,lineEnding:$,link:d(P),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:W,resourceDestinationString:O,resourceTitleString:V,resource:te,setextHeading:d(R),setextHeadingLineSequence:I,setextHeadingText:k,strong:d(),thematicBreak:d()}};tL(t,(e||{}).mdastExtensions||[]);const n={};return s;function s(he){let we={type:"root",children:[]};const He={stack:[we],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:p,data:n},Je=[];let dt=-1;for(;++dt<he.length;)if(he[dt][1].type==="listOrdered"||he[dt][1].type==="listUnordered")if(he[dt][0]==="enter")Je.push(dt);else{const Yt=Je.pop();dt=a(he,Yt,dt)}for(dt=-1;++dt<he.length;){const Yt=t[he[dt][0]];eL.call(Yt,he[dt][1].type)&&Yt[he[dt][1].type].call(Object.assign({sliceSerialize:he[dt][2].sliceSerialize},He),he[dt][1])}if(He.tokenStack.length>0){const Yt=He.tokenStack[He.tokenStack.length-1];(Yt[1]||Ik).call(He,void 0,Yt[0])}for(we.position={start:Ci(he.length>0?he[0][1].start:{line:1,column:1,offset:0}),end:Ci(he.length>0?he[he.length-2][1].end:{line:1,column:1,offset:0})},dt=-1;++dt<t.transforms.length;)we=t.transforms[dt](we)||we;return we}function a(he,we,He){let Je=we-1,dt=-1,Yt=!1,pt,cn,jn,je;for(;++Je<=He;){const et=he[Je];switch(et[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{et[0]==="enter"?dt++:dt--,je=void 0;break}case"lineEndingBlank":{et[0]==="enter"&&(pt&&!je&&!dt&&!jn&&(jn=Je),je=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:je=void 0}if(!dt&&et[0]==="enter"&&et[1].type==="listItemPrefix"||dt===-1&&et[0]==="exit"&&(et[1].type==="listUnordered"||et[1].type==="listOrdered")){if(pt){let wt=Je;for(cn=void 0;wt--;){const gt=he[wt];if(gt[1].type==="lineEnding"||gt[1].type==="lineEndingBlank"){if(gt[0]==="exit")continue;cn&&(he[cn][1].type="lineEndingBlank",Yt=!0),gt[1].type="lineEnding",cn=wt}else if(!(gt[1].type==="linePrefix"||gt[1].type==="blockQuotePrefix"||gt[1].type==="blockQuotePrefixWhitespace"||gt[1].type==="blockQuoteMarker"||gt[1].type==="listItemIndent"))break}jn&&(!cn||jn<cn)&&(pt._spread=!0),pt.end=Object.assign({},cn?he[cn][1].start:et[1].end),he.splice(cn||Je,0,["exit",pt,et[2]]),Je++,He++}if(et[1].type==="listItemPrefix"){const wt={type:"listItem",_spread:!1,start:Object.assign({},et[1].start),end:void 0};pt=wt,he.splice(Je,0,["enter",wt,et[2]]),Je++,He++,jn=void 0,je=!0}}}return he[we][1]._spread=Yt,He}function o(he,we){return He;function He(Je){c.call(this,he(Je),Je),we&&we.call(this,Je)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(he,we,He){this.stack[this.stack.length-1].children.push(he),this.stack.push(he),this.tokenStack.push([we,He||void 0]),he.position={start:Ci(we.start),end:void 0}}function d(he){return we;function we(He){he&&he.call(this,He),h.call(this,He)}}function h(he,we){const He=this.stack.pop(),Je=this.tokenStack.pop();if(Je)Je[0].type!==he.type&&(we?we.call(this,he,Je[0]):(Je[1]||Ik).call(this,he,Je[0]));else throw new Error("Cannot close `"+he.type+"` ("+Xu({start:he.start,end:he.end})+"): it’s not open");He.position.end=Ci(he.end)}function p(){return zy(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function g(he){if(this.data.expectingFirstListItemValue){const we=this.stack[this.stack.length-2];we.start=Number.parseInt(this.sliceSerialize(he),10),this.data.expectingFirstListItemValue=void 0}}function v(){const he=this.resume(),we=this.stack[this.stack.length-1];we.lang=he}function C(){const he=this.resume(),we=this.stack[this.stack.length-1];we.meta=he}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const he=this.resume(),we=this.stack[this.stack.length-1];we.value=he.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const he=this.resume(),we=this.stack[this.stack.length-1];we.value=he.replace(/(\r?\n|\r)$/g,"")}function E(he){const we=this.resume(),He=this.stack[this.stack.length-1];He.label=we,He.identifier=Fs(this.sliceSerialize(he)).toLowerCase()}function _(){const he=this.resume(),we=this.stack[this.stack.length-1];we.title=he}function N(){const he=this.resume(),we=this.stack[this.stack.length-1];we.url=he}function A(he){const we=this.stack[this.stack.length-1];if(!we.depth){const He=this.sliceSerialize(he).length;we.depth=He}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function I(he){const we=this.stack[this.stack.length-1];we.depth=this.sliceSerialize(he).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function M(he){const He=this.stack[this.stack.length-1].children;let Je=He[He.length-1];(!Je||Je.type!=="text")&&(Je=Gt(),Je.position={start:Ci(he.start),end:void 0},He.push(Je)),this.stack.push(Je)}function L(he){const we=this.stack.pop();we.value+=this.sliceSerialize(he),we.position.end=Ci(he.end)}function $(he){const we=this.stack[this.stack.length-1];if(this.data.atHardBreak){const He=we.children[we.children.length-1];He.position.end=Ci(he.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(we.type)&&(M.call(this,he),L.call(this,he))}function H(){this.data.atHardBreak=!0}function B(){const he=this.resume(),we=this.stack[this.stack.length-1];we.value=he}function z(){const he=this.resume(),we=this.stack[this.stack.length-1];we.value=he}function Q(){const he=this.resume(),we=this.stack[this.stack.length-1];we.value=he}function P(){const he=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=we,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function X(){const he=this.stack[this.stack.length-1];if(this.data.inReference){const we=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=we,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function Y(he){const we=this.sliceSerialize(he),He=this.stack[this.stack.length-2];He.label=dK(we),He.identifier=Fs(we).toLowerCase()}function F(){const he=this.stack[this.stack.length-1],we=this.resume(),He=this.stack[this.stack.length-1];if(this.data.inReference=!0,He.type==="link"){const Je=he.children;He.children=Je}else He.alt=we}function O(){const he=this.resume(),we=this.stack[this.stack.length-1];we.url=he}function V(){const he=this.resume(),we=this.stack[this.stack.length-1];we.title=he}function te(){this.data.inReference=void 0}function U(){this.data.referenceType="collapsed"}function W(he){const we=this.resume(),He=this.stack[this.stack.length-1];He.label=we,He.identifier=Fs(this.sliceSerialize(he)).toLowerCase(),this.data.referenceType="full"}function ae(he){this.data.characterReferenceType=he.type}function se(he){const we=this.sliceSerialize(he),He=this.data.characterReferenceType;let Je;He?(Je=G3(we,He==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Je=Ed(we);const dt=this.stack[this.stack.length-1];dt.value+=Je}function K(he){const we=this.stack.pop();we.position.end=Ci(he.end)}function G(he){L.call(this,he);const we=this.stack[this.stack.length-1];we.url=this.sliceSerialize(he)}function Z(he){L.call(this,he);const we=this.stack[this.stack.length-1];we.url="mailto:"+this.sliceSerialize(he)}function ce(){return{type:"blockquote",children:[]}}function le(){return{type:"code",lang:null,meta:null,value:""}}function ne(){return{type:"inlineCode",value:""}}function pe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ye(){return{type:"emphasis",children:[]}}function Ge(){return{type:"heading",depth:0,children:[]}}function Ke(){return{type:"break"}}function Re(){return{type:"html",value:""}}function Lt(){return{type:"image",title:null,url:"",alt:null}}function At(){return{type:"link",title:null,url:"",children:[]}}function Ct(he){return{type:"list",ordered:he.type==="listOrdered",start:null,spread:he._spread,children:[]}}function Xe(he){return{type:"listItem",spread:he._spread,checked:null,children:[]}}function Qe(){return{type:"paragraph",children:[]}}function vt(){return{type:"strong",children:[]}}function Gt(){return{type:"text",value:""}}function ke(){return{type:"thematicBreak"}}}function Ci(e){return{line:e.line,column:e.column,offset:e.offset}}function tL(e,t){let n=-1;for(;++n<t.length;){const s=t[n];Array.isArray(s)?tL(e,s):mK(e,s)}}function mK(e,t){let n;for(n in t)if(eL.call(t,n))switch(n){case"canContainEols":{const s=t[n];s&&e[n].push(...s);break}case"transforms":{const s=t[n];s&&e[n].push(...s);break}case"enter":case"exit":{const s=t[n];s&&Object.assign(e[n],s);break}}}function Ik(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Xu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Xu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Xu({start:t.start,end:t.end})+") is still open")}function nL(e){const t=this;t.parser=n;function n(s){return fK(s,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function gK(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function bK(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
@@ -755,7 +755,7 @@ ${R.content||""}`;s(M)}else s(null)}catch(k){console.error("Error fetching propo
|
|
|
755
755
|
${a}`,n&&`=== PROPOSAL CONTENT ===
|
|
756
756
|
${n}`].filter(Boolean),R=I.length>0?I.join(`
|
|
757
757
|
|
|
758
|
-
`):null;return{type:g.includes("/edit")?"proposals-edit":"proposals-view",content:R,displayId:N,contextFiles:k}}return{type:"proposals",content:a,contextFiles:"project.md"}}return g.includes("/context")?g.includes("/architecture")?{type:"context-architecture",content:u,contextFiles:"architecture.md"}:g.includes("/project")?{type:"context-project",content:a,contextFiles:"project.md"}:g.includes("/knowledge")?{type:"context-knowledge",content:null}:{type:"context",content:null}:g.includes("/settings")?g.includes("/agents")?{type:"settings-agents",content:null}:g.includes("/integrations")?{type:"settings-integrations",content:null}:g.includes("/prompts")?{type:"settings-prompts",content:null}:g.includes("/rules")?{type:"settings-rules",content:null}:g.includes("/user")?{type:"settings-user",content:null}:{type:"settings",content:null}:g.includes("/terminal")?{type:"terminal",content:null}:{type:"dashboard",content:null}};return r.jsx(gO,{children:r.jsxs("div",{className:"flex min-h-screen w-full overflow-hidden",children:[r.jsx(Mq,{}),r.jsxs(vO,{className:Te("flex-1 min-w-0 transition-all duration-300 ease-in-out",e&&"mr-96"),children:[r.jsxs("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b border-content-border px-4 bg-background",children:[r.jsx(xO,{className:"-ml-1"}),r.jsxs("div",{className:"flex items-center justify-between flex-1",children:[r.jsx("h1",{className:"text-lg font-semibold",children:d||"Coconut"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(re,{onClick:b,size:"icon",variant:"outline",className:"h-8 w-8 rounded-full",children:r.jsx(fd,{className:"h-4 w-4"})}),S&&v&&r.jsxs(Bi,{children:[r.jsx(Ui,{asChild:!0,children:r.jsx(re,{size:"icon",variant:"outline",className:"h-8 w-8 rounded-full",children:r.jsx(U0,{className:"h-4 w-4"})})}),r.jsxs(Ya,{align:"end",children:[r.jsx(Ka,{children:r.jsxs("div",{className:"flex flex-col space-y-1",children:[r.jsx("p",{className:"text-sm font-medium leading-none",children:v.name}),r.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:v.email})]})}),r.jsx(Xa,{}),r.jsxs(uE,{onClick:y,children:[r.jsx(OU,{className:"mr-2 h-4 w-4"}),"Logout"]})]})]})]})]})]}),r.jsx("main",{className:"flex flex-1 flex-col gap-4 p-4 overflow-auto bg-content-background",children:r.jsx(HD,{})})]}),r.jsx(kJ,{isOpen:e,onToggle:b,contextInfo:E()})]})})}const Ie=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:Te("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Ie.displayName="Card";const nt=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:Te("flex flex-col space-y-1.5 p-6",e),...t}));nt.displayName="CardHeader";const st=w.forwardRef(({className:e,...t},n)=>r.jsx("h3",{ref:n,className:Te("font-semibold leading-none tracking-tight",e),...t}));st.displayName="CardTitle";const qt=w.forwardRef(({className:e,...t},n)=>r.jsx("p",{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));qt.displayName="CardDescription";const Be=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:Te("p-6 pt-0",e),...t}));Be.displayName="CardContent";const s6=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:Te("flex items-center p-6 pt-0",e),...t}));s6.displayName="CardFooter";const Jee=fc("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ut({className:e,variant:t,...n}){return r.jsx("div",{className:Te(Jee({variant:t}),e),...n})}function ete({open:e,onOpenChange:t,workflows:n}){const[s,a]=w.useState(null),[o,u]=w.useState(0),c=v=>{a(v),u(0)},d=()=>{o>0?u(o-1):a(null)},h=()=>{s&&o<s.steps.length-1&&u(o+1)},p=()=>{a(null),u(0),t(!1)},m=()=>r.jsxs("div",{className:"space-y-6",children:[r.jsxs(nn,{children:[r.jsx(rn,{className:"text-2xl",children:"Getting Started Wizard"}),r.jsx(_n,{children:"Choose a workflow to get started with Coconut. We'll guide you through each step."})]}),r.jsx(Ns,{className:"h-[500px] pr-4",children:r.jsx("div",{className:"space-y-3",children:n.map(v=>r.jsx(Ie,{className:"cursor-pointer hover:bg-accent hover:border-accent-foreground/20 transition-colors",onClick:()=>c(v),children:r.jsx(Be,{className:"p-6",children:r.jsxs("div",{className:"flex items-start space-x-4",children:[r.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-lg bg-primary/10 flex items-center justify-center text-primary",children:v.icon}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("h3",{className:"text-lg font-semibold mb-1",children:v.title}),r.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:v.description}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxs(ut,{variant:"secondary",className:"text-xs",children:[v.steps.length," steps"]}),r.jsx(Ls,{className:"h-4 w-4 text-muted-foreground"})]})]})]})})},v.id))})})]}),g=()=>{if(!s)return null;const v=s.steps[o],C=o===s.steps.length-1;return r.jsxs("div",{className:"space-y-6",children:[r.jsxs(nn,{children:[r.jsxs("div",{className:"flex items-center space-x-3 mb-2",children:[r.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center text-primary",children:s.icon}),r.jsxs("div",{className:"flex-1",children:[r.jsx(rn,{className:"text-xl",children:s.title}),r.jsxs(_n,{children:["Step ",o+1," of ",s.steps.length]})]})]}),r.jsx("div",{className:"flex items-center space-x-2 pt-2",children:s.steps.map((S,b)=>r.jsx("div",{className:Te("h-1.5 flex-1 rounded-full transition-colors",b<=o?"bg-primary":"bg-muted")},b))})]}),r.jsx(Ns,{className:"h-[450px] pr-4",children:r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-semibold mb-2",children:v.title}),r.jsx("p",{className:"text-sm text-muted-foreground",children:v.description})]}),v.content&&r.jsxs("div",{className:"space-y-4",children:[v.content.text&&r.jsx(Ie,{children:r.jsx(Be,{className:"p-4",children:r.jsx("p",{className:"text-sm leading-relaxed",children:v.content.text})})}),v.content.image&&r.jsx(Ie,{children:r.jsx(Be,{className:"p-4",children:r.jsxs("div",{className:"space-y-2",children:[r.jsx("img",{src:v.content.image.src,alt:v.content.image.alt,className:"w-full rounded-md border"}),v.content.image.caption&&r.jsx("p",{className:"text-xs text-muted-foreground text-center",children:v.content.image.caption})]})})}),v.content.video&&r.jsx(Ie,{children:r.jsx(Be,{className:"p-4",children:r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"relative rounded-md overflow-hidden border bg-muted",children:r.jsx("video",{src:v.content.video.src,poster:v.content.video.poster,controls:!0,className:"w-full",children:"Your browser does not support the video tag."})}),v.content.video.caption&&r.jsx("p",{className:"text-xs text-muted-foreground text-center",children:v.content.video.caption})]})})})]}),C&&r.jsx(Ie,{className:"bg-primary/5 border-primary/20",children:r.jsxs(Be,{className:"p-4 flex items-center space-x-3",children:[r.jsx(nm,{className:"h-5 w-5 text-primary flex-shrink-0"}),r.jsx("p",{className:"text-sm font-medium",children:`You've completed this workflow! Click "Finish" to close this wizard.`})]})})]})}),r.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[r.jsxs(re,{variant:"outline",onClick:d,children:[r.jsx(OI,{className:"mr-2 h-4 w-4"}),o===0?"Back to Workflows":"Previous"]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(re,{variant:"ghost",onClick:p,children:"Cancel"}),C?r.jsx(re,{onClick:p,children:"Finish"}):r.jsxs(re,{onClick:h,children:["Next",r.jsx(Ls,{className:"ml-2 h-4 w-4"})]})]})]})]})};return r.jsx(fn,{open:e,onOpenChange:t,children:r.jsx(ln,{className:"max-w-3xl max-h-[90vh]",children:s?g():m()})})}const tte=[{id:"new-project",title:"Start Developing a New Project",description:"Set up a brand new project with Coconut from scratch",icon:r.jsx(sH,{className:"h-6 w-6"}),steps:[{title:"Welcome to Your New Project",description:"Let's set up your development environment and project structure",content:{text:"In this step, you'll learn how to initialize a new project with Coconut. We'll guide you through configuring your project settings, choosing your tech stack, and setting up your development environment."}},{title:"Configure Project Settings",description:"Customize your project configuration and preferences",content:{text:"Define your project name, description, and select the technologies you want to use. You can also configure advanced settings like build tools, testing frameworks, and deployment options."}},{title:"Initialize Your Workspace",description:"Create your project structure and install dependencies",content:{text:"Coconut will create the necessary files and folders for your project. This includes setting up version control, installing dependencies, and configuring your development tools."}}]},{id:"connect-project",title:"Connect an Existing Project",description:"Import and configure an existing codebase with Coconut",icon:r.jsx(Qf,{className:"h-6 w-6"}),steps:[{title:"Select Your Project",description:"Choose the project directory you want to connect",content:{text:"Navigate to your existing project folder or clone a repository. Coconut will analyze your project structure and detect the technologies you're using."}},{title:"Review Project Analysis",description:"Verify the detected technologies and configuration",content:{text:"Coconut has analyzed your project and detected the frameworks, libraries, and tools you're using. Review this information and make any necessary adjustments."}},{title:"Complete Integration",description:"Finalize the connection and sync your project",content:{text:"Coconut will create the necessary configuration files and integrate with your existing project. You'll be able to use all Coconut features with your codebase."}}]},{id:"analyze-code",title:"Analyze Code and Generate a Report",description:"Get insights, metrics, and recommendations for your codebase",icon:r.jsx(Y9,{className:"h-6 w-6"}),steps:[{title:"Choose Analysis Scope",description:"Select what parts of your codebase to analyze",content:{text:"You can analyze your entire codebase or focus on specific directories, files, or modules. Choose the scope that best fits your needs."}},{title:"Configure Analysis Parameters",description:"Select the types of analysis you want to run",content:{text:"Choose from code quality checks, security scans, performance analysis, dependency reviews, and more. Customize the analysis to focus on what matters most to you."}},{title:"Review and Export Results",description:"View your analysis report and take action on findings",content:{text:"Coconut will generate a comprehensive report with actionable insights. You can export the report in various formats, share it with your team, or create change proposals to address issues."}}]},{id:"create-proposal",title:"Create a Change Proposal and Assign a Coding Agent",description:"Define a change and let AI agents help implement it",icon:r.jsx(Ku,{className:"h-6 w-6"}),steps:[{title:"Describe Your Change",description:"Define what you want to build or modify",content:{text:"Clearly describe the feature, bug fix, or refactoring you want to implement. Provide context, requirements, and any relevant technical details."}},{title:"Select an AI Agent",description:"Choose the right agent for your task",content:{text:"Pick from specialized agents based on your needs - frontend development, backend APIs, database changes, testing, documentation, and more. Each agent has unique capabilities and expertise."}},{title:"Review and Launch",description:"Confirm your proposal and start the implementation",content:{text:"Review your change proposal details and agent assignment. Once you're ready, launch the agent to start working on your change. You can monitor progress and provide feedback throughout."}}]},{id:"schedule-job",title:"Schedule an Agent Job",description:"Set up automated tasks and recurring agent workflows",icon:r.jsx(em,{className:"h-6 w-6"}),steps:[{title:"Define Your Job",description:"Specify what task the agent should perform",content:{text:"Describe the task you want to automate - code reviews, dependency updates, security scans, report generation, or custom workflows. Provide clear instructions for the agent."}},{title:"Set Schedule and Triggers",description:"Configure when and how often the job should run",content:{text:"Choose a schedule (daily, weekly, monthly, or custom cron expression) or set up event-based triggers like commits, pull requests, or deployments."}},{title:"Configure Notifications",description:"Decide how you want to be notified about job results",content:{text:"Set up notifications for job completion, failures, or important findings. Choose your preferred channels - email, Slack, GitHub, or in-app notifications."}}]}];function nte(){const[e,t]=w.useState({total:0,inReview:0,approved:0}),[n,s]=w.useState([]),[a,o]=w.useState(!0),[u,c]=w.useState(!1);return w.useEffect(()=>{(async()=>{try{const p=await(await fetch(`${Ae}/api/v1/proposals`)).json();if(p.success&&p.data){const m=p.data,g={total:m.length,inReview:m.filter(C=>C.status==="in-review").length,approved:m.filter(C=>C.status==="approved"||C.status==="code-complete").length},v=m.sort((C,S)=>{const b=new Date(C.metadata?.updatedAt||C.metadata?.createdAt||0);return new Date(S.metadata?.updatedAt||S.metadata?.createdAt||0).getTime()-b.getTime()}).slice(0,5);t(g),s(v)}}catch(h){console.error("Failed to fetch proposal stats:",h)}finally{o(!1)}})()},[]),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Home"}),r.jsx("p",{className:"text-muted-foreground",children:"Manage change proposals, brainstorm, and take quick actions."})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[r.jsx(it,{to:"/proposals",children:r.jsxs(Ie,{className:"hover:bg-accent hover:border-accent-foreground/20 transition-colors cursor-pointer",children:[r.jsxs(nt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[r.jsx(st,{className:"text-sm font-medium",children:"All Proposals"}),r.jsx(Ku,{className:"h-4 w-4 text-muted-foreground"})]}),r.jsxs(Be,{children:[r.jsx("div",{className:"text-2xl font-bold",children:a?"...":e.total}),r.jsx("p",{className:"text-xs text-muted-foreground",children:e.total===0?"No proposals yet":`${e.total} proposal${e.total!==1?"s":""}`})]})]})}),r.jsx(it,{to:"/proposals?status=in-review",children:r.jsxs(Ie,{className:"hover:bg-accent hover:border-accent-foreground/20 transition-colors cursor-pointer",children:[r.jsxs(nt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[r.jsx(st,{className:"text-sm font-medium",children:"In Review"}),r.jsx(ty,{className:"h-4 w-4 text-muted-foreground"})]}),r.jsxs(Be,{children:[r.jsx("div",{className:"text-2xl font-bold",children:a?"...":e.inReview}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"Awaiting approval"})]})]})}),r.jsx(it,{to:"/proposals?status=approved",children:r.jsxs(Ie,{className:"hover:bg-accent hover:border-accent-foreground/20 transition-colors cursor-pointer",children:[r.jsxs(nt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[r.jsx(st,{className:"text-sm font-medium",children:"Approved / Code Complete"}),r.jsx(tm,{className:"h-4 w-4 text-muted-foreground"})]}),r.jsxs(Be,{children:[r.jsx("div",{className:"text-2xl font-bold",children:a?"...":e.approved}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"Ready to implement"})]})]})})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Recent Proposals"}),r.jsx(qt,{children:"Latest change proposals in your project"})]}),r.jsx(Be,{children:a?r.jsx("div",{className:"space-y-3",children:[1,2,3].map(d=>r.jsxs("div",{className:"animate-pulse",children:[r.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),r.jsx("div",{className:"h-3 bg-muted rounded w-1/2 mt-2"})]},d))}):n.length>0?r.jsxs("div",{className:"space-y-4",children:[n.map(d=>r.jsx(it,{to:`/proposals/${d.id}`,className:"block",children:r.jsxs("div",{className:"flex items-center space-x-3 p-3 rounded-lg border hover:bg-accent hover:border-accent-foreground/20 transition-colors cursor-pointer",children:[r.jsx("div",{className:"flex-shrink-0",children:r.jsx(ut,{variant:d.status==="approved"||d.status==="code-complete"?"default":d.status==="in-review"?"secondary":d.status==="draft"?"outline":"destructive",children:d.status})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("h4",{className:"text-sm font-medium truncate",children:d.intent}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:[d.author.name," • ",new Date(d.metadata?.updatedAt||d.metadata?.createdAt||"").toLocaleDateString()]})]})]})},d.id)),r.jsx("div",{className:"pt-2",children:r.jsx(re,{variant:"outline",size:"sm",asChild:!0,className:"w-full",children:r.jsx(it,{to:"/proposals",children:"View All Proposals"})})})]}):r.jsxs("div",{className:"text-center py-6",children:[r.jsx(Ku,{className:"mx-auto h-12 w-12 text-muted-foreground/50"}),r.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No proposals yet"}),r.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Create your first change proposal to get started."}),r.jsx(re,{asChild:!0,className:"mt-4",children:r.jsxs(it,{to:"/proposals/new",children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"Create Proposal"]})})]})})]}),r.jsxs(Ie,{className:"flex flex-col",children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Quick Actions"}),r.jsx(qt,{children:"Common tasks and operations"})]}),r.jsx(Be,{className:"flex flex-col flex-1",children:r.jsxs("div",{className:"space-y-2",children:[r.jsx(re,{asChild:!0,variant:"default",className:"w-full justify-start",children:r.jsxs(it,{to:"/proposals/new",children:[r.jsx(Ku,{className:"mr-2 h-4 w-4"}),"New Proposal"]})}),r.jsx(re,{asChild:!0,variant:"outline",className:"w-full justify-start",children:r.jsxs(it,{to:"/context/project/edit",children:[r.jsx(Nr,{className:"mr-2 h-4 w-4"}),"Update Project Overview"]})}),r.jsx(re,{asChild:!0,variant:"outline",className:"w-full justify-start",children:r.jsxs(it,{to:"/context/architecture/edit",children:[r.jsx(Li,{className:"mr-2 h-4 w-4"}),"Update Technical Architecture"]})}),r.jsx(re,{asChild:!0,variant:"outline",className:"w-full justify-start",children:r.jsxs(it,{to:"/agents/new",children:[r.jsx(mr,{className:"mr-2 h-4 w-4"}),"Create New Agent"]})}),r.jsx(re,{asChild:!0,variant:"outline",className:"w-full justify-start",children:r.jsxs(it,{to:"/code",children:[r.jsx(ja,{className:"mr-2 h-4 w-4"}),"Start Coding Agent"]})})]})})]})]}),r.jsx(ete,{open:u,onOpenChange:c,workflows:tte})]})}var rte="Label",a6=w.forwardRef((e,t)=>r.jsx(ht.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));a6.displayName=rte;var i6=a6;const ste=fc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),be=w.forwardRef(({className:e,...t},n)=>r.jsx(i6,{ref:n,className:Te(ste(),e),...t}));be.displayName=i6.displayName;var Mm="Tabs",[ate,ehe]=Fr(Mm,[wc]),o6=wc(),[ite,dE]=ate(Mm),l6=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,onValueChange:a,defaultValue:o,orientation:u="horizontal",dir:c,activationMode:d="automatic",...h}=e,p=vc(c),[m,g]=ia({prop:s,onChange:a,defaultProp:o??"",caller:Mm});return r.jsx(ite,{scope:n,baseId:Ms(),value:m,onValueChange:g,orientation:u,dir:p,activationMode:d,children:r.jsx(ht.div,{dir:p,"data-orientation":u,...h,ref:t})})});l6.displayName=Mm;var c6="TabsList",u6=w.forwardRef((e,t)=>{const{__scopeTabs:n,loop:s=!0,...a}=e,o=dE(c6,n),u=o6(n);return r.jsx(tE,{asChild:!0,...u,orientation:o.orientation,dir:o.dir,loop:s,children:r.jsx(ht.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});u6.displayName=c6;var d6="TabsTrigger",h6=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,disabled:a=!1,...o}=e,u=dE(d6,n),c=o6(n),d=m6(u.baseId,s),h=g6(u.baseId,s),p=s===u.value;return r.jsx(nE,{asChild:!0,...c,focusable:!a,active:p,children:r.jsx(ht.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":h,"data-state":p?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:d,...o,ref:t,onMouseDown:Ve(e.onMouseDown,m=>{!a&&m.button===0&&m.ctrlKey===!1?u.onValueChange(s):m.preventDefault()}),onKeyDown:Ve(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&u.onValueChange(s)}),onFocus:Ve(e.onFocus,()=>{const m=u.activationMode!=="manual";!p&&!a&&m&&u.onValueChange(s)})})})});h6.displayName=d6;var f6="TabsContent",p6=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,forceMount:a,children:o,...u}=e,c=dE(f6,n),d=m6(c.baseId,s),h=g6(c.baseId,s),p=s===c.value,m=w.useRef(p);return w.useEffect(()=>{const g=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(g)},[]),r.jsx(xr,{present:a||p,children:({present:g})=>r.jsx(ht.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!g,id:h,tabIndex:0,...u,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:g&&o})})});p6.displayName=f6;function m6(e,t){return`${e}-trigger-${t}`}function g6(e,t){return`${e}-content-${t}`}var ote=l6,b6=u6,x6=h6,v6=p6;const Fm=ote,Xd=w.forwardRef(({className:e,...t},n)=>r.jsx(b6,{ref:n,className:Te("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Xd.displayName=b6.displayName;const Yr=w.forwardRef(({className:e,...t},n)=>r.jsx(x6,{ref:n,className:Te("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Yr.displayName=x6.displayName;const Kr=w.forwardRef(({className:e,...t},n)=>r.jsx(v6,{ref:n,className:Te("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Kr.displayName=v6.displayName;function lte(){const e=In(),t=Mr(),{login:n,register:s,isAuthenticated:a,authEnabled:o,isLoading:u}=uc(),[c,d]=w.useState(!1),[h,p]=w.useState("login"),[m,g]=w.useState(""),[v,C]=w.useState(""),[S,b]=w.useState(""),[y,E]=w.useState(""),[_,N]=w.useState("");w.useEffect(()=>{if(!u){if(!o)e("/");else if(a){const I=t.state?.from?.pathname||"/";e(I,{replace:!0})}}},[o,a,u,e,t]);const A=async I=>{I.preventDefault(),d(!0);try{await n(m,v),Et({title:"Success",description:"Logged in successfully"});const R=t.state?.from?.pathname||"/";e(R,{replace:!0})}catch(R){Et({title:"Login failed",description:R.message||"Invalid email or password",variant:"destructive"})}finally{d(!1)}},k=async I=>{if(I.preventDefault(),y.length<8){Et({title:"Invalid password",description:"Password must be at least 8 characters",variant:"destructive"});return}d(!0);try{await s(S,y,_),Et({title:"Success",description:"Account created successfully"});const R=t.state?.from?.pathname||"/";e(R,{replace:!0})}catch(R){Et({title:"Registration failed",description:R.message||"Failed to create account",variant:"destructive"})}finally{d(!1)}};return u?r.jsx("div",{className:"min-h-screen flex items-center justify-center",children:r.jsx(tn,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):r.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background to-muted p-4",children:r.jsxs(Ie,{className:"w-full max-w-md",children:[r.jsxs(nt,{className:"space-y-1 text-center",children:[r.jsx("div",{className:"flex justify-center mb-4",children:r.jsx("svg",{className:"h-12 w-12 text-green-600",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"})})}),r.jsx(st,{className:"text-2xl font-bold",children:"Welcome to Coconut"}),r.jsx(qt,{children:"Sign in to your account or create a new one"})]}),r.jsx(Be,{children:r.jsxs(Fm,{value:h,onValueChange:I=>p(I),children:[r.jsxs(Xd,{className:"grid w-full grid-cols-2",children:[r.jsx(Yr,{value:"login",children:"Login"}),r.jsx(Yr,{value:"register",children:"Register"})]}),r.jsx(Kr,{value:"login",className:"space-y-4",children:r.jsxs("form",{onSubmit:A,className:"space-y-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"login-email",children:"Email"}),r.jsx(Fe,{id:"login-email",type:"email",placeholder:"you@example.com",value:m,onChange:I=>g(I.target.value),required:!0,disabled:c})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"login-password",children:"Password"}),r.jsx(Fe,{id:"login-password",type:"password",value:v,onChange:I=>C(I.target.value),required:!0,disabled:c})]}),r.jsx(re,{type:"submit",className:"w-full",disabled:c,children:c?r.jsxs(r.Fragment,{children:[r.jsx(tn,{className:"mr-2 h-4 w-4 animate-spin"}),"Logging in..."]}):"Login"})]})}),r.jsx(Kr,{value:"register",className:"space-y-4",children:r.jsxs("form",{onSubmit:k,className:"space-y-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"register-email",children:"Email"}),r.jsx(Fe,{id:"register-email",type:"email",placeholder:"you@example.com",value:S,onChange:I=>b(I.target.value),required:!0,disabled:c}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"Only whitelisted emails can register"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"register-name",children:"Name"}),r.jsx(Fe,{id:"register-name",type:"text",placeholder:"Your name",value:_,onChange:I=>N(I.target.value),required:!0,disabled:c})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"register-password",children:"Password"}),r.jsx(Fe,{id:"register-password",type:"password",value:y,onChange:I=>E(I.target.value),required:!0,disabled:c,minLength:8}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"At least 8 characters"})]}),r.jsx(re,{type:"submit",className:"w-full",disabled:c,children:c?r.jsxs(r.Fragment,{children:[r.jsx(tn,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating account..."]}):"Create Account"})]})})]})})]})})}const Al="coconut/github-auth-state";function cte(e){try{window.opener&&window.opener.postMessage({type:"github-auth",...e},window.location.origin)}catch{}}const ute=()=>{const[e,t]=w.useState("pending"),[n,s]=w.useState("Authorizing GitHub…");return w.useEffect(()=>{const a=new URLSearchParams(window.location.search),o=a.get("error"),u=a.get("token"),c=a.get("expires_at")||a.get("expiresAt"),d=a.get("state"),h=g=>{cte(g),t(g.success?"success":"error"),s(g.message),setTimeout(()=>{try{window.close()}catch{}},1200)};if(o){localStorage.removeItem(Al),h({success:!1,message:decodeURIComponent(o)});return}if(!u||!c||!d){localStorage.removeItem(Al),h({success:!1,message:"Missing authorization parameters. Please try again."});return}const p=localStorage.getItem(Al);if(!p||p!==d){localStorage.removeItem(Al),h({success:!1,message:"Authorization state mismatch. Please start again."});return}(async()=>{try{const g=await fetch(`${Ae}/api/v1/git/providers/github/token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:u,expiresAt:c,state:d})}),v=await g.json();if(!g.ok||!v.success)throw new Error(v?.error?.message||"Failed to store GitHub token");localStorage.removeItem(Al),h({success:!0,message:"GitHub connected successfully!",expiresAt:v.data?.expiresAt||c})}catch(g){localStorage.removeItem(Al),h({success:!1,message:g?.message||"Failed to store GitHub token. Please try again."})}})()},[]),r.jsx("div",{className:"flex h-screen items-center justify-center bg-background px-6",children:r.jsxs("div",{className:"max-w-sm rounded-lg border bg-card p-6 text-center shadow-sm",children:[r.jsxs("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:[e==="pending"&&r.jsx(tn,{className:"h-6 w-6 animate-spin text-muted-foreground"}),e==="success"&&r.jsx(nm,{className:"h-6 w-6 text-green-600"}),e==="error"&&r.jsx(ey,{className:"h-6 w-6 text-red-600"})]}),r.jsx("h1",{className:"text-lg font-semibold",children:"GitHub Authorization"}),r.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:n}),e!=="pending"&&r.jsx("p",{className:"mt-4 text-xs text-muted-foreground",children:"You can close this window and return to Coconut."})]})})};function Za(e){return Array.isArray?Array.isArray(e):S6(e)==="[object Array]"}function dte(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function hte(e){return e==null?"":dte(e)}function ra(e){return typeof e=="string"}function y6(e){return typeof e=="number"}function fte(e){return e===!0||e===!1||pte(e)&&S6(e)=="[object Boolean]"}function E6(e){return typeof e=="object"}function pte(e){return E6(e)&&e!==null}function cs(e){return e!=null}function i0(e){return!e.trim().length}function S6(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const mte="Incorrect 'index' type",gte=e=>`Invalid value for key ${e}`,bte=e=>`Pattern length exceeds max of ${e}.`,xte=e=>`Missing ${e} property in key`,vte=e=>`Property 'weight' in key '${e}' must be a positive integer`,lR=Object.prototype.hasOwnProperty;class yte{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(s=>{let a=_6(s);this._keys.push(a),this._keyMap[a.id]=a,n+=a.weight}),this._keys.forEach(s=>{s.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function _6(e){let t=null,n=null,s=null,a=1,o=null;if(ra(e)||Za(e))s=e,t=cR(e),n=bv(e);else{if(!lR.call(e,"name"))throw new Error(xte("name"));const u=e.name;if(s=u,lR.call(e,"weight")&&(a=e.weight,a<=0))throw new Error(vte(u));t=cR(u),n=bv(u),o=e.getFn}return{path:t,id:n,weight:a,src:s,getFn:o}}function cR(e){return Za(e)?e:e.split(".")}function bv(e){return Za(e)?e.join("."):e}function Ete(e,t){let n=[],s=!1;const a=(o,u,c)=>{if(cs(o))if(!u[c])n.push(o);else{let d=u[c];const h=o[d];if(!cs(h))return;if(c===u.length-1&&(ra(h)||y6(h)||fte(h)))n.push(hte(h));else if(Za(h)){s=!0;for(let p=0,m=h.length;p<m;p+=1)a(h[p],u,c+1)}else u.length&&a(h,u,c+1)}};return a(e,ra(t)?t.split("."):t,0),s?n:n[0]}const Ste={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},_te={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},wte={location:0,threshold:.6,distance:100},Cte={useExtendedSearch:!1,getFn:Ete,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var _t={..._te,...Ste,...wte,...Cte};const Nte=/[^ ]+/g;function Tte(e=1,t=3){const n=new Map,s=Math.pow(10,t);return{get(a){const o=a.match(Nte).length;if(n.has(o))return n.get(o);const u=1/Math.pow(o,.5*e),c=parseFloat(Math.round(u*s)/s);return n.set(o,c),c},clear(){n.clear()}}}class hE{constructor({getFn:t=_t.getFn,fieldNormWeight:n=_t.fieldNormWeight}={}){this.norm=Tte(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,s)=>{this._keysMap[n.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,ra(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();ra(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,s=this.size();n<s;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!cs(t)||i0(t))return;let s={v:t,i:n,n:this.norm.get(t)};this.records.push(s)}_addObject(t,n){let s={i:n,$:{}};this.keys.forEach((a,o)=>{let u=a.getFn?a.getFn(t):this.getFn(t,a.path);if(cs(u)){if(Za(u)){let c=[];const d=[{nestedArrIndex:-1,value:u}];for(;d.length;){const{nestedArrIndex:h,value:p}=d.pop();if(cs(p))if(ra(p)&&!i0(p)){let m={v:p,i:h,n:this.norm.get(p)};c.push(m)}else Za(p)&&p.forEach((m,g)=>{d.push({nestedArrIndex:g,value:m})})}s.$[o]=c}else if(ra(u)&&!i0(u)){let c={v:u,n:this.norm.get(u)};s.$[o]=c}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function w6(e,t,{getFn:n=_t.getFn,fieldNormWeight:s=_t.fieldNormWeight}={}){const a=new hE({getFn:n,fieldNormWeight:s});return a.setKeys(e.map(_6)),a.setSources(t),a.create(),a}function Ate(e,{getFn:t=_t.getFn,fieldNormWeight:n=_t.fieldNormWeight}={}){const{keys:s,records:a}=e,o=new hE({getFn:t,fieldNormWeight:n});return o.setKeys(s),o.setIndexRecords(a),o}function Ff(e,{errors:t=0,currentLocation:n=0,expectedLocation:s=0,distance:a=_t.distance,ignoreLocation:o=_t.ignoreLocation}={}){const u=t/e.length;if(o)return u;const c=Math.abs(s-n);return a?u+c/a:c?1:u}function kte(e=[],t=_t.minMatchCharLength){let n=[],s=-1,a=-1,o=0;for(let u=e.length;o<u;o+=1){let c=e[o];c&&s===-1?s=o:!c&&s!==-1&&(a=o-1,a-s+1>=t&&n.push([s,a]),s=-1)}return e[o-1]&&o-s>=t&&n.push([s,o-1]),n}const po=32;function Rte(e,t,n,{location:s=_t.location,distance:a=_t.distance,threshold:o=_t.threshold,findAllMatches:u=_t.findAllMatches,minMatchCharLength:c=_t.minMatchCharLength,includeMatches:d=_t.includeMatches,ignoreLocation:h=_t.ignoreLocation}={}){if(t.length>po)throw new Error(bte(po));const p=t.length,m=e.length,g=Math.max(0,Math.min(s,m));let v=o,C=g;const S=c>1||d,b=S?Array(m):[];let y;for(;(y=e.indexOf(t,C))>-1;){let I=Ff(t,{currentLocation:y,expectedLocation:g,distance:a,ignoreLocation:h});if(v=Math.min(I,v),C=y+p,S){let R=0;for(;R<p;)b[y+R]=1,R+=1}}C=-1;let E=[],_=1,N=p+m;const A=1<<p-1;for(let I=0;I<p;I+=1){let R=0,M=N;for(;R<M;)Ff(t,{errors:I,currentLocation:g+M,expectedLocation:g,distance:a,ignoreLocation:h})<=v?R=M:N=M,M=Math.floor((N-R)/2+R);N=M;let L=Math.max(1,g-M+1),$=u?m:Math.min(g+M,m)+p,H=Array($+2);H[$+1]=(1<<I)-1;for(let z=$;z>=L;z-=1){let Q=z-1,P=n[e.charAt(Q)];if(S&&(b[Q]=+!!P),H[z]=(H[z+1]<<1|1)&P,I&&(H[z]|=(E[z+1]|E[z])<<1|1|E[z+1]),H[z]&A&&(_=Ff(t,{errors:I,currentLocation:Q,expectedLocation:g,distance:a,ignoreLocation:h}),_<=v)){if(v=_,C=Q,C<=g)break;L=Math.max(1,2*g-C)}}if(Ff(t,{errors:I+1,currentLocation:g,expectedLocation:g,distance:a,ignoreLocation:h})>v)break;E=H}const k={isMatch:C>=0,score:Math.max(.001,_)};if(S){const I=kte(b,c);I.length?d&&(k.indices=I):k.isMatch=!1}return k}function Dte(e){let t={};for(let n=0,s=e.length;n<s;n+=1){const a=e.charAt(n);t[a]=(t[a]||0)|1<<s-n-1}return t}const Lp=String.prototype.normalize?(e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(e=>e);class C6{constructor(t,{location:n=_t.location,threshold:s=_t.threshold,distance:a=_t.distance,includeMatches:o=_t.includeMatches,findAllMatches:u=_t.findAllMatches,minMatchCharLength:c=_t.minMatchCharLength,isCaseSensitive:d=_t.isCaseSensitive,ignoreDiacritics:h=_t.ignoreDiacritics,ignoreLocation:p=_t.ignoreLocation}={}){if(this.options={location:n,threshold:s,distance:a,includeMatches:o,findAllMatches:u,minMatchCharLength:c,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:p},t=d?t:t.toLowerCase(),t=h?Lp(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const m=(v,C)=>{this.chunks.push({pattern:v,alphabet:Dte(v),startIndex:C})},g=this.pattern.length;if(g>po){let v=0;const C=g%po,S=g-C;for(;v<S;)m(this.pattern.substr(v,po),v),v+=po;if(C){const b=g-po;m(this.pattern.substr(b),b)}}else m(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:s,includeMatches:a}=this.options;if(t=n?t:t.toLowerCase(),t=s?Lp(t):t,this.pattern===t){let S={isMatch:!0,score:0};return a&&(S.indices=[[0,t.length-1]]),S}const{location:o,distance:u,threshold:c,findAllMatches:d,minMatchCharLength:h,ignoreLocation:p}=this.options;let m=[],g=0,v=!1;this.chunks.forEach(({pattern:S,alphabet:b,startIndex:y})=>{const{isMatch:E,score:_,indices:N}=Rte(t,S,b,{location:o+y,distance:u,threshold:c,findAllMatches:d,minMatchCharLength:h,includeMatches:a,ignoreLocation:p});E&&(v=!0),g+=_,E&&N&&(m=[...m,...N])});let C={isMatch:v,score:v?g/this.chunks.length:1};return v&&a&&(C.indices=m),C}}class Gi{constructor(t){this.pattern=t}static isMultiMatch(t){return uR(t,this.multiRegex)}static isSingleMatch(t){return uR(t,this.singleRegex)}search(){}}function uR(e,t){const n=e.match(t);return n?n[1]:null}class Ite extends Gi{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class jte extends Gi{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const s=t.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class Ote extends Gi{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class Lte extends Gi{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Mte extends Gi{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class Fte extends Gi{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class N6 extends Gi{constructor(t,{location:n=_t.location,threshold:s=_t.threshold,distance:a=_t.distance,includeMatches:o=_t.includeMatches,findAllMatches:u=_t.findAllMatches,minMatchCharLength:c=_t.minMatchCharLength,isCaseSensitive:d=_t.isCaseSensitive,ignoreDiacritics:h=_t.ignoreDiacritics,ignoreLocation:p=_t.ignoreLocation}={}){super(t),this._bitapSearch=new C6(t,{location:n,threshold:s,distance:a,includeMatches:o,findAllMatches:u,minMatchCharLength:c,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:p})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class T6 extends Gi{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,s;const a=[],o=this.pattern.length;for(;(s=t.indexOf(this.pattern,n))>-1;)n=s+o,a.push([s,n-1]);const u=!!a.length;return{isMatch:u,score:u?0:1,indices:a}}}const xv=[Ite,T6,Ote,Lte,Fte,Mte,jte,N6],dR=xv.length,Pte=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Bte="|";function Ute(e,t={}){return e.split(Bte).map(n=>{let s=n.trim().split(Pte).filter(o=>o&&!!o.trim()),a=[];for(let o=0,u=s.length;o<u;o+=1){const c=s[o];let d=!1,h=-1;for(;!d&&++h<dR;){const p=xv[h];let m=p.isMultiMatch(c);m&&(a.push(new p(m,t)),d=!0)}if(!d)for(h=-1;++h<dR;){const p=xv[h];let m=p.isSingleMatch(c);if(m){a.push(new p(m,t));break}}}return a})}const Hte=new Set([N6.type,T6.type]);class $te{constructor(t,{isCaseSensitive:n=_t.isCaseSensitive,ignoreDiacritics:s=_t.ignoreDiacritics,includeMatches:a=_t.includeMatches,minMatchCharLength:o=_t.minMatchCharLength,ignoreLocation:u=_t.ignoreLocation,findAllMatches:c=_t.findAllMatches,location:d=_t.location,threshold:h=_t.threshold,distance:p=_t.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:s,includeMatches:a,minMatchCharLength:o,findAllMatches:c,ignoreLocation:u,location:d,threshold:h,distance:p},t=n?t:t.toLowerCase(),t=s?Lp(t):t,this.pattern=t,this.query=Ute(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:a,ignoreDiacritics:o}=this.options;t=a?t:t.toLowerCase(),t=o?Lp(t):t;let u=0,c=[],d=0;for(let h=0,p=n.length;h<p;h+=1){const m=n[h];c.length=0,u=0;for(let g=0,v=m.length;g<v;g+=1){const C=m[g],{isMatch:S,indices:b,score:y}=C.search(t);if(S){if(u+=1,d+=y,s){const E=C.constructor.type;Hte.has(E)?c=[...c,...b]:c.push(b)}}else{d=0,u=0,c.length=0;break}}if(u){let g={isMatch:!0,score:d/u};return s&&(g.indices=c),g}}return{isMatch:!1,score:1}}}const vv=[];function zte(...e){vv.push(...e)}function yv(e,t){for(let n=0,s=vv.length;n<s;n+=1){let a=vv[n];if(a.condition(e,t))return new a(e,t)}return new C6(e,t)}const Mp={AND:"$and",OR:"$or"},Ev={PATH:"$path",PATTERN:"$val"},Sv=e=>!!(e[Mp.AND]||e[Mp.OR]),Gte=e=>!!e[Ev.PATH],qte=e=>!Za(e)&&E6(e)&&!Sv(e),hR=e=>({[Mp.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function A6(e,t,{auto:n=!0}={}){const s=a=>{let o=Object.keys(a);const u=Gte(a);if(!u&&o.length>1&&!Sv(a))return s(hR(a));if(qte(a)){const d=u?a[Ev.PATH]:o[0],h=u?a[Ev.PATTERN]:a[d];if(!ra(h))throw new Error(gte(d));const p={keyId:bv(d),pattern:h};return n&&(p.searcher=yv(h,t)),p}let c={children:[],operator:o[0]};return o.forEach(d=>{const h=a[d];Za(h)&&h.forEach(p=>{c.children.push(s(p))})}),c};return Sv(e)||(e=hR(e)),s(e)}function Wte(e,{ignoreFieldNorm:t=_t.ignoreFieldNorm}){e.forEach(n=>{let s=1;n.matches.forEach(({key:a,norm:o,score:u})=>{const c=a?a.weight:null;s*=Math.pow(u===0&&c?Number.EPSILON:u,(c||1)*(t?1:o))}),n.score=s})}function Vte(e,t){const n=e.matches;t.matches=[],cs(n)&&n.forEach(s=>{if(!cs(s.indices)||!s.indices.length)return;const{indices:a,value:o}=s;let u={indices:a,value:o};s.key&&(u.key=s.key.src),s.idx>-1&&(u.refIndex=s.idx),t.matches.push(u)})}function Yte(e,t){t.score=e.score}function Kte(e,t,{includeMatches:n=_t.includeMatches,includeScore:s=_t.includeScore}={}){const a=[];return n&&a.push(Vte),s&&a.push(Yte),e.map(o=>{const{idx:u}=o,c={item:t[u],refIndex:u};return a.length&&a.forEach(d=>{d(o,c)}),c})}class Cc{constructor(t,n={},s){this.options={..._t,...n},this.options.useExtendedSearch,this._keyStore=new yte(this.options.keys),this.setCollection(t,s)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof hE))throw new Error(mte);this._myIndex=n||w6(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){cs(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let s=0,a=this._docs.length;s<a;s+=1){const o=this._docs[s];t(o,s)&&(this.removeAt(s),s-=1,a-=1,n.push(o))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:s,includeScore:a,shouldSort:o,sortFn:u,ignoreFieldNorm:c}=this.options;let d=ra(t)?ra(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return Wte(d,{ignoreFieldNorm:c}),o&&d.sort(u),y6(n)&&n>-1&&(d=d.slice(0,n)),Kte(d,this._docs,{includeMatches:s,includeScore:a})}_searchStringList(t){const n=yv(t,this.options),{records:s}=this._myIndex,a=[];return s.forEach(({v:o,i:u,n:c})=>{if(!cs(o))return;const{isMatch:d,score:h,indices:p}=n.searchIn(o);d&&a.push({item:o,idx:u,matches:[{score:h,value:o,norm:c,indices:p}]})}),a}_searchLogical(t){const n=A6(t,this.options),s=(c,d,h)=>{if(!c.children){const{keyId:m,searcher:g}=c,v=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(d,m),searcher:g});return v&&v.length?[{idx:h,item:d,matches:v}]:[]}const p=[];for(let m=0,g=c.children.length;m<g;m+=1){const v=c.children[m],C=s(v,d,h);if(C.length)p.push(...C);else if(c.operator===Mp.AND)return[]}return p},a=this._myIndex.records,o={},u=[];return a.forEach(({$:c,i:d})=>{if(cs(c)){let h=s(n,c,d);h.length&&(o[d]||(o[d]={idx:d,item:c,matches:[]},u.push(o[d])),h.forEach(({matches:p})=>{o[d].matches.push(...p)}))}}),u}_searchObjectList(t){const n=yv(t,this.options),{keys:s,records:a}=this._myIndex,o=[];return a.forEach(({$:u,i:c})=>{if(!cs(u))return;let d=[];s.forEach((h,p)=>{d.push(...this._findMatches({key:h,value:u[p],searcher:n}))}),d.length&&o.push({idx:c,item:u,matches:d})}),o}_findMatches({key:t,value:n,searcher:s}){if(!cs(n))return[];let a=[];if(Za(n))n.forEach(({v:o,i:u,n:c})=>{if(!cs(o))return;const{isMatch:d,score:h,indices:p}=s.searchIn(o);d&&a.push({score:h,key:t,value:o,idx:u,norm:c,indices:p})});else{const{v:o,n:u}=n,{isMatch:c,score:d,indices:h}=s.searchIn(o);c&&a.push({score:d,key:t,value:o,norm:u,indices:h})}return a}}Cc.version="7.1.0";Cc.createIndex=w6;Cc.parseIndex=Ate;Cc.config=_t;Cc.parseQuery=A6;zte($te);function Xte(e){switch(e){case"approved":case"code-complete":return"default";case"in-review":return"secondary";case"rejected":return"destructive";default:return"outline"}}function Zte(e){switch(e){case"high":case"critical":return"destructive";case"medium":return"secondary";default:return"outline"}}function Qte(){const[e]=EB(),t=In(),n=Mr(),[s,a]=w.useState([]),[o,u]=w.useState([]),[c,d]=w.useState(!0),[h,p]=w.useState(null),[m,g]=w.useState(e.get("status")||"active"),[v,C]=w.useState(e.get("priority")||"all"),[S,b]=w.useState(e.get("search")||""),[y,E]=w.useState(!!e.get("search")),[_,N]=w.useState(e.get("sortBy")||"created"),[A,k]=w.useState(e.get("order")||"desc"),I=w.useRef(null),R=w.useCallback(P=>{const X=new URLSearchParams(e);Object.entries(P).forEach(([O,V])=>{V&&V!=="all"&&V!=="active"&&V!==""?X.set(O,V):X.delete(O)});const Y=X.toString(),F=Y?`?${Y}`:"";t(`${n.pathname}${F}`)},[e,t,n.pathname]),M=w.useCallback(P=>{g(P),R({status:P==="active"?null:P})},[R]),L=w.useCallback(P=>{C(P),R({priority:P==="all"?null:P})},[R]),$=w.useCallback(P=>{b(P),R({search:P||null})},[R]),H=w.useCallback(P=>{N(P),R({sortBy:P==="created"?null:P})},[R]),B=w.useCallback(()=>{const P=A==="asc"?"desc":"asc";k(P),R({order:P==="desc"?null:P})},[A,R]),z=w.useCallback(P=>{if(P.key==="s"||P.key==="S"){const X=document.activeElement;X?.tagName==="INPUT"||X?.tagName==="TEXTAREA"||X?.getAttribute("contenteditable")==="true"||(P.preventDefault(),E(!0),setTimeout(()=>{I.current?.focus()},0))}},[]);w.useEffect(()=>(document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}),[z]);const Q=w.useMemo(()=>{const P={keys:[{name:"intent",weight:.4},{name:"id",weight:.3},{name:"author.name",weight:.2},{name:"metadata.tags",weight:.1}],threshold:.3,includeScore:!0};return new Cc(s,P)},[s]);return w.useEffect(()=>{async function P(){try{d(!0);const Y=await(await fetch(`${Ae}/api/v1/proposals`)).json();Y.success?(a(Y.data),u(Y.data)):p(Y.error?.message||"Failed to fetch proposals")}catch(X){p(X instanceof Error?X.message:"Unknown error")}finally{d(!1)}}P()},[]),w.useEffect(()=>{let P=s;if(m==="active"?P=P.filter(X=>["draft","proposed","in-review","approved","code-complete"].includes(X.status)):m==="approved"?P=P.filter(X=>["approved","code-complete"].includes(X.status)):m!=="all"&&(P=P.filter(X=>X.status===m)),v!=="all"&&(P=P.filter(X=>X.metadata.priority===v)),S.trim()){const X=Q.search(S),Y=new Set(X.map(F=>F.item.id));P=P.filter(F=>Y.has(F.id))}P=P.sort((X,Y)=>{let F,O;switch(_){case"created":{F=new Date(X.metadata.createdAt).getTime(),O=new Date(Y.metadata.createdAt).getTime();break}case"updated":{F=new Date(X.metadata.updatedAt).getTime(),O=new Date(Y.metadata.updatedAt).getTime();break}case"status":{F=X.status,O=Y.status;break}case"priority":{const V={critical:4,high:3,medium:2,low:1};F=V[X.metadata.priority]||0,O=V[Y.metadata.priority]||0;break}case"intent":{F=X.intent.toLowerCase(),O=Y.intent.toLowerCase();break}default:F=new Date(X.metadata.createdAt).getTime(),O=new Date(Y.metadata.createdAt).getTime()}return A==="asc"?F<O?-1:F>O?1:0:F>O?-1:F<O?1:0}),u(P)},[s,m,v,S,_,A,Q]),c?r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Proposals"}),r.jsx("p",{className:"text-muted-foreground",children:"Manage change proposals for your project"})]}),r.jsx(re,{asChild:!0,children:r.jsxs(it,{to:"/proposals/new",children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"New Proposal"]})})]}),r.jsx("div",{className:"space-y-4",children:[...Array(3)].map((P,X)=>r.jsx(Ie,{children:r.jsx(nt,{children:r.jsxs("div",{className:"flex justify-between items-start",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"h-6 bg-muted rounded w-3/4 animate-pulse"}),r.jsx("div",{className:"h-4 bg-muted rounded w-1/2 animate-pulse"})]}),r.jsx("div",{className:"h-6 bg-muted rounded w-20 animate-pulse"})]})})},X))})]}):h?r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Proposals"}),r.jsx("p",{className:"text-muted-foreground",children:"Manage change proposals for your project"})]}),r.jsx(re,{asChild:!0,children:r.jsxs(it,{to:"/proposals/new",children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"New Proposal"]})})]}),r.jsx(Ie,{children:r.jsx(Be,{className:"pt-6",children:r.jsx("div",{className:"text-center",children:r.jsxs("p",{className:"text-destructive",children:["Error: ",h]})})})})]}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Proposals"}),r.jsx("p",{className:"text-muted-foreground",children:"Manage change proposals for your project"})]}),r.jsx(re,{asChild:!0,children:r.jsxs(it,{to:"/proposals/new",children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"New Proposal"]})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex gap-2 flex-wrap justify-between",children:[r.jsxs("div",{className:"flex gap-2 flex-wrap",children:[r.jsxs(Zt,{value:m,onValueChange:M,children:[r.jsxs(Wt,{className:"w-[180px]",children:[r.jsx(Rx,{className:"mr-2 h-4 w-4"}),r.jsx(Qt,{placeholder:"Filter by status"})]}),r.jsxs(Vt,{children:[r.jsx(Le,{value:"active",children:"Active (Default)"}),r.jsx(Le,{value:"all",children:"All statuses"}),r.jsx(Le,{value:"draft",children:"Draft"}),r.jsx(Le,{value:"proposed",children:"Proposed"}),r.jsx(Le,{value:"in-review",children:"In Review"}),r.jsx(Le,{value:"approved",children:"Approved"}),r.jsx(Le,{value:"code-complete",children:"Code Complete"}),r.jsx(Le,{value:"merged",children:"Merged"}),r.jsx(Le,{value:"rejected",children:"Rejected"})]})]}),r.jsxs(Zt,{value:v,onValueChange:L,children:[r.jsxs(Wt,{className:"w-[180px]",children:[r.jsx(Rx,{className:"mr-2 h-4 w-4"}),r.jsx(Qt,{placeholder:"Filter by priority"})]}),r.jsxs(Vt,{children:[r.jsx(Le,{value:"all",children:"All priorities"}),r.jsx(Le,{value:"low",children:"Low"}),r.jsx(Le,{value:"medium",children:"Medium"}),r.jsx(Le,{value:"high",children:"High"}),r.jsx(Le,{value:"critical",children:"Critical"})]})]}),r.jsxs(Zt,{value:_,onValueChange:P=>H(P),children:[r.jsxs(Wt,{className:"w-[140px]",children:[r.jsx(l9,{className:"mr-2 h-4 w-4"}),r.jsx(Qt,{})]}),r.jsxs(Vt,{children:[r.jsx(Le,{value:"created",children:"Created"}),r.jsx(Le,{value:"updated",children:"Updated"}),r.jsx(Le,{value:"status",children:"Status"}),r.jsx(Le,{value:"priority",children:"Priority"}),r.jsx(Le,{value:"intent",children:"Title"})]})]}),r.jsx(re,{variant:"outline",size:"sm",onClick:B,className:"min-w-[80px]",children:A==="asc"?r.jsxs(r.Fragment,{children:[r.jsx(u9,{className:"mr-2 h-4 w-4"}),"Asc"]}):r.jsxs(r.Fragment,{children:[r.jsx(s9,{className:"mr-2 h-4 w-4"}),"Desc"]})})]}),r.jsxs(re,{variant:"outline",size:"sm",onClick:()=>{E(!y),y||setTimeout(()=>{I.current?.focus()},0)},className:y?"bg-green-600 text-white hover:bg-green-700 border-green-600":"",children:[r.jsx(ny,{className:"mr-2 h-4 w-4"}),"Search"]})]}),y&&r.jsxs("div",{className:"flex gap-2",children:[r.jsx(Fe,{ref:I,placeholder:"Search proposals by title, ID, author, or tags...",value:S,onChange:P=>$(P.target.value),className:"flex-1"}),S&&r.jsx(re,{variant:"outline",size:"sm",onClick:()=>$(""),children:"Clear"})]})]}),o.length===0&&s.length>0?r.jsx(Ie,{children:r.jsx(Be,{className:"pt-6",children:r.jsxs("div",{className:"text-center py-6",children:[r.jsx(Rx,{className:"mx-auto h-12 w-12 text-muted-foreground/50"}),r.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No proposals match your filters"}),r.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Try adjusting your status or priority filters."}),r.jsx(re,{variant:"outline",className:"mt-4",onClick:()=>{M("active"),L("all"),$(""),E(!1)},children:"Clear Filters"})]})})}):s.length===0?r.jsx(Ie,{children:r.jsx(Be,{className:"pt-6",children:r.jsxs("div",{className:"text-center py-6",children:[r.jsx(Ri,{className:"mx-auto h-12 w-12 text-muted-foreground/50"}),r.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No proposals yet"}),r.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Create your first change proposal to get started."}),r.jsx(re,{asChild:!0,className:"mt-4",children:r.jsxs(it,{to:"/proposals/new",children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"Create Proposal"]})})]})})}):r.jsx("div",{className:"space-y-4",children:o.map(P=>r.jsx(it,{to:`/proposals/${P.id}`,className:"block",children:r.jsx(Ie,{className:"hover:shadow-md hover:bg-muted/30 transition-all cursor-pointer",children:r.jsx(Be,{className:"py-4",children:r.jsx("div",{className:"flex justify-between items-start gap-4",children:r.jsxs("div",{className:"flex-1 space-y-2",children:[r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsx(st,{className:"text-base leading-tight",children:P.intent}),r.jsxs("div",{className:"flex gap-1 ml-3 flex-shrink-0",children:[P.metadata.priority&&r.jsx(ut,{variant:Zte(P.metadata.priority),className:"text-xs",children:P.metadata.priority}),r.jsx(ut,{variant:Xte(P.status),className:"text-xs",children:P.status})]})]}),P.content&&r.jsxs("div",{className:"text-sm text-muted-foreground leading-relaxed",children:[P.content.split(`
|
|
758
|
+
`):null;return{type:g.includes("/edit")?"proposals-edit":"proposals-view",content:R,displayId:N,contextFiles:k}}return{type:"proposals",content:a,contextFiles:"project.md"}}return g.includes("/context")?g.includes("/architecture")?{type:"context-architecture",content:u,contextFiles:"architecture.md"}:g.includes("/project")?{type:"context-project",content:a,contextFiles:"project.md"}:g.includes("/knowledge")?{type:"context-knowledge",content:null}:{type:"context",content:null}:g.includes("/settings")?g.includes("/agents")?{type:"settings-agents",content:null}:g.includes("/integrations")?{type:"settings-integrations",content:null}:g.includes("/prompts")?{type:"settings-prompts",content:null}:g.includes("/rules")?{type:"settings-rules",content:null}:g.includes("/user")?{type:"settings-user",content:null}:{type:"settings",content:null}:g.includes("/terminal")?{type:"terminal",content:null}:{type:"dashboard",content:null}};return r.jsx(gO,{children:r.jsxs("div",{className:"flex min-h-screen w-full overflow-hidden",children:[r.jsx(Mq,{}),r.jsxs(vO,{className:Te("flex-1 min-w-0 transition-all duration-300 ease-in-out",e&&"mr-96"),children:[r.jsxs("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b border-content-border px-4 bg-background",children:[r.jsx(xO,{className:"-ml-1"}),r.jsxs("div",{className:"flex items-center justify-between flex-1",children:[r.jsx("h1",{className:"text-lg font-semibold",children:d||"Coconut"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(re,{onClick:b,size:"icon",variant:"outline",className:"h-8 w-8 rounded-full",children:r.jsx(fd,{className:"h-4 w-4"})}),S&&v&&r.jsxs(Bi,{children:[r.jsx(Ui,{asChild:!0,children:r.jsx(re,{size:"icon",variant:"outline",className:"h-8 w-8 rounded-full",children:r.jsx(U0,{className:"h-4 w-4"})})}),r.jsxs(Ya,{align:"end",children:[r.jsx(Ka,{children:r.jsxs("div",{className:"flex flex-col space-y-1",children:[r.jsx("p",{className:"text-sm font-medium leading-none",children:v.name}),r.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:v.email})]})}),r.jsx(Xa,{}),r.jsxs(uE,{onClick:y,children:[r.jsx(OU,{className:"mr-2 h-4 w-4"}),"Logout"]})]})]})]})]})]}),r.jsx("main",{className:"flex flex-1 flex-col gap-4 p-4 overflow-auto bg-content-background",children:r.jsx(HD,{})})]}),r.jsx(kJ,{isOpen:e,onToggle:b,contextInfo:E()})]})})}const Ie=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:Te("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Ie.displayName="Card";const nt=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:Te("flex flex-col space-y-1.5 p-6",e),...t}));nt.displayName="CardHeader";const st=w.forwardRef(({className:e,...t},n)=>r.jsx("h3",{ref:n,className:Te("font-semibold leading-none tracking-tight",e),...t}));st.displayName="CardTitle";const qt=w.forwardRef(({className:e,...t},n)=>r.jsx("p",{ref:n,className:Te("text-sm text-muted-foreground",e),...t}));qt.displayName="CardDescription";const Be=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:Te("p-6 pt-0",e),...t}));Be.displayName="CardContent";const s6=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:Te("flex items-center p-6 pt-0",e),...t}));s6.displayName="CardFooter";const Jee=fc("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ut({className:e,variant:t,...n}){return r.jsx("div",{className:Te(Jee({variant:t}),e),...n})}function ete({open:e,onOpenChange:t,workflows:n}){const[s,a]=w.useState(null),[o,u]=w.useState(0),c=v=>{a(v),u(0)},d=()=>{o>0?u(o-1):a(null)},h=()=>{s&&o<s.steps.length-1&&u(o+1)},p=()=>{a(null),u(0),t(!1)},m=()=>r.jsxs("div",{className:"space-y-6",children:[r.jsxs(nn,{children:[r.jsx(rn,{className:"text-2xl",children:"Getting Started Wizard"}),r.jsx(_n,{children:"Choose a workflow to get started with Coconut. We'll guide you through each step."})]}),r.jsx(Ns,{className:"h-[500px] pr-4",children:r.jsx("div",{className:"space-y-3",children:n.map(v=>r.jsx(Ie,{className:"cursor-pointer hover:bg-accent hover:border-accent-foreground/20 transition-colors",onClick:()=>c(v),children:r.jsx(Be,{className:"p-6",children:r.jsxs("div",{className:"flex items-start space-x-4",children:[r.jsx("div",{className:"flex-shrink-0 w-12 h-12 rounded-lg bg-primary/10 flex items-center justify-center text-primary",children:v.icon}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("h3",{className:"text-lg font-semibold mb-1",children:v.title}),r.jsx("p",{className:"text-sm text-muted-foreground mb-3",children:v.description}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxs(ut,{variant:"secondary",className:"text-xs",children:[v.steps.length," steps"]}),r.jsx(Ls,{className:"h-4 w-4 text-muted-foreground"})]})]})]})})},v.id))})})]}),g=()=>{if(!s)return null;const v=s.steps[o],C=o===s.steps.length-1;return r.jsxs("div",{className:"space-y-6",children:[r.jsxs(nn,{children:[r.jsxs("div",{className:"flex items-center space-x-3 mb-2",children:[r.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center text-primary",children:s.icon}),r.jsxs("div",{className:"flex-1",children:[r.jsx(rn,{className:"text-xl",children:s.title}),r.jsxs(_n,{children:["Step ",o+1," of ",s.steps.length]})]})]}),r.jsx("div",{className:"flex items-center space-x-2 pt-2",children:s.steps.map((S,b)=>r.jsx("div",{className:Te("h-1.5 flex-1 rounded-full transition-colors",b<=o?"bg-primary":"bg-muted")},b))})]}),r.jsx(Ns,{className:"h-[450px] pr-4",children:r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-semibold mb-2",children:v.title}),r.jsx("p",{className:"text-sm text-muted-foreground",children:v.description})]}),v.content&&r.jsxs("div",{className:"space-y-4",children:[v.content.text&&r.jsx(Ie,{children:r.jsx(Be,{className:"p-4",children:r.jsx("p",{className:"text-sm leading-relaxed",children:v.content.text})})}),v.content.image&&r.jsx(Ie,{children:r.jsx(Be,{className:"p-4",children:r.jsxs("div",{className:"space-y-2",children:[r.jsx("img",{src:v.content.image.src,alt:v.content.image.alt,className:"w-full rounded-md border"}),v.content.image.caption&&r.jsx("p",{className:"text-xs text-muted-foreground text-center",children:v.content.image.caption})]})})}),v.content.video&&r.jsx(Ie,{children:r.jsx(Be,{className:"p-4",children:r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"relative rounded-md overflow-hidden border bg-muted",children:r.jsx("video",{src:v.content.video.src,poster:v.content.video.poster,controls:!0,className:"w-full",children:"Your browser does not support the video tag."})}),v.content.video.caption&&r.jsx("p",{className:"text-xs text-muted-foreground text-center",children:v.content.video.caption})]})})})]}),C&&r.jsx(Ie,{className:"bg-primary/5 border-primary/20",children:r.jsxs(Be,{className:"p-4 flex items-center space-x-3",children:[r.jsx(nm,{className:"h-5 w-5 text-primary flex-shrink-0"}),r.jsx("p",{className:"text-sm font-medium",children:`You've completed this workflow! Click "Finish" to close this wizard.`})]})})]})}),r.jsxs("div",{className:"flex items-center justify-between pt-4 border-t",children:[r.jsxs(re,{variant:"outline",onClick:d,children:[r.jsx(OI,{className:"mr-2 h-4 w-4"}),o===0?"Back to Workflows":"Previous"]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(re,{variant:"ghost",onClick:p,children:"Cancel"}),C?r.jsx(re,{onClick:p,children:"Finish"}):r.jsxs(re,{onClick:h,children:["Next",r.jsx(Ls,{className:"ml-2 h-4 w-4"})]})]})]})]})};return r.jsx(fn,{open:e,onOpenChange:t,children:r.jsx(ln,{className:"max-w-3xl max-h-[90vh]",children:s?g():m()})})}const tte=[{id:"new-project",title:"Start Developing a New Project",description:"Set up a brand new project with Coconut from scratch",icon:r.jsx(sH,{className:"h-6 w-6"}),steps:[{title:"Welcome to Your New Project",description:"Let's set up your development environment and project structure",content:{text:"In this step, you'll learn how to initialize a new project with Coconut. We'll guide you through configuring your project settings, choosing your tech stack, and setting up your development environment."}},{title:"Configure Project Settings",description:"Customize your project configuration and preferences",content:{text:"Define your project name, description, and select the technologies you want to use. You can also configure advanced settings like build tools, testing frameworks, and deployment options."}},{title:"Initialize Your Workspace",description:"Create your project structure and install dependencies",content:{text:"Coconut will create the necessary files and folders for your project. This includes setting up version control, installing dependencies, and configuring your development tools."}}]},{id:"connect-project",title:"Connect an Existing Project",description:"Import and configure an existing codebase with Coconut",icon:r.jsx(Qf,{className:"h-6 w-6"}),steps:[{title:"Select Your Project",description:"Choose the project directory you want to connect",content:{text:"Navigate to your existing project folder or clone a repository. Coconut will analyze your project structure and detect the technologies you're using."}},{title:"Review Project Analysis",description:"Verify the detected technologies and configuration",content:{text:"Coconut has analyzed your project and detected the frameworks, libraries, and tools you're using. Review this information and make any necessary adjustments."}},{title:"Complete Integration",description:"Finalize the connection and sync your project",content:{text:"Coconut will create the necessary configuration files and integrate with your existing project. You'll be able to use all Coconut features with your codebase."}}]},{id:"analyze-code",title:"Analyze Code and Generate a Report",description:"Get insights, metrics, and recommendations for your codebase",icon:r.jsx(Y9,{className:"h-6 w-6"}),steps:[{title:"Choose Analysis Scope",description:"Select what parts of your codebase to analyze",content:{text:"You can analyze your entire codebase or focus on specific directories, files, or modules. Choose the scope that best fits your needs."}},{title:"Configure Analysis Parameters",description:"Select the types of analysis you want to run",content:{text:"Choose from code quality checks, security scans, performance analysis, dependency reviews, and more. Customize the analysis to focus on what matters most to you."}},{title:"Review and Export Results",description:"View your analysis report and take action on findings",content:{text:"Coconut will generate a comprehensive report with actionable insights. You can export the report in various formats, share it with your team, or create change proposals to address issues."}}]},{id:"create-proposal",title:"Create a Change Proposal and Assign a Coding Agent",description:"Define a change and let AI agents help implement it",icon:r.jsx(Ku,{className:"h-6 w-6"}),steps:[{title:"Describe Your Change",description:"Define what you want to build or modify",content:{text:"Clearly describe the feature, bug fix, or refactoring you want to implement. Provide context, requirements, and any relevant technical details."}},{title:"Select an AI Agent",description:"Choose the right agent for your task",content:{text:"Pick from specialized agents based on your needs - frontend development, backend APIs, database changes, testing, documentation, and more. Each agent has unique capabilities and expertise."}},{title:"Review and Launch",description:"Confirm your proposal and start the implementation",content:{text:"Review your change proposal details and agent assignment. Once you're ready, launch the agent to start working on your change. You can monitor progress and provide feedback throughout."}}]},{id:"schedule-job",title:"Schedule an Agent Job",description:"Set up automated tasks and recurring agent workflows",icon:r.jsx(em,{className:"h-6 w-6"}),steps:[{title:"Define Your Job",description:"Specify what task the agent should perform",content:{text:"Describe the task you want to automate - code reviews, dependency updates, security scans, report generation, or custom workflows. Provide clear instructions for the agent."}},{title:"Set Schedule and Triggers",description:"Configure when and how often the job should run",content:{text:"Choose a schedule (daily, weekly, monthly, or custom cron expression) or set up event-based triggers like commits, pull requests, or deployments."}},{title:"Configure Notifications",description:"Decide how you want to be notified about job results",content:{text:"Set up notifications for job completion, failures, or important findings. Choose your preferred channels - email, Slack, GitHub, or in-app notifications."}}]}];function nte(){const[e,t]=w.useState({total:0,inReview:0,approved:0}),[n,s]=w.useState([]),[a,o]=w.useState(!0),[u,c]=w.useState(!1);return w.useEffect(()=>{(async()=>{try{const p=await(await fetch(`${Ae}/api/v1/proposals`)).json();if(p.success&&p.data){const m=p.data,g={total:m.length,inReview:m.filter(C=>C.status==="in-review").length,approved:m.filter(C=>C.status==="approved"||C.status==="code-complete").length},v=m.sort((C,S)=>{const b=new Date(C.metadata?.updatedAt||C.metadata?.createdAt||0);return new Date(S.metadata?.updatedAt||S.metadata?.createdAt||0).getTime()-b.getTime()}).slice(0,5);t(g),s(v)}}catch(h){console.error("Failed to fetch proposal stats:",h)}finally{o(!1)}})()},[]),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Home"}),r.jsx("p",{className:"text-muted-foreground",children:"Manage change proposals, brainstorm, and take quick actions."})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[r.jsx(it,{to:"/proposals",children:r.jsxs(Ie,{className:"hover:bg-accent hover:border-accent-foreground/20 transition-colors cursor-pointer",children:[r.jsxs(nt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[r.jsx(st,{className:"text-sm font-medium",children:"All Proposals"}),r.jsx(Ku,{className:"h-4 w-4 text-muted-foreground"})]}),r.jsxs(Be,{children:[r.jsx("div",{className:"text-2xl font-bold",children:a?"...":e.total}),r.jsx("p",{className:"text-xs text-muted-foreground",children:e.total===0?"No proposals yet":`${e.total} proposal${e.total!==1?"s":""}`})]})]})}),r.jsx(it,{to:"/proposals?status=in-review",children:r.jsxs(Ie,{className:"hover:bg-accent hover:border-accent-foreground/20 transition-colors cursor-pointer",children:[r.jsxs(nt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[r.jsx(st,{className:"text-sm font-medium",children:"In Review"}),r.jsx(ty,{className:"h-4 w-4 text-muted-foreground"})]}),r.jsxs(Be,{children:[r.jsx("div",{className:"text-2xl font-bold",children:a?"...":e.inReview}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"Awaiting approval"})]})]})}),r.jsx(it,{to:"/proposals?status=approved",children:r.jsxs(Ie,{className:"hover:bg-accent hover:border-accent-foreground/20 transition-colors cursor-pointer",children:[r.jsxs(nt,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[r.jsx(st,{className:"text-sm font-medium",children:"Approved / Code Complete"}),r.jsx(tm,{className:"h-4 w-4 text-muted-foreground"})]}),r.jsxs(Be,{children:[r.jsx("div",{className:"text-2xl font-bold",children:a?"...":e.approved}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"Ready to implement"})]})]})})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Recent Proposals"}),r.jsx(qt,{children:"Latest change proposals in your project"})]}),r.jsx(Be,{children:a?r.jsx("div",{className:"space-y-3",children:[1,2,3].map(d=>r.jsxs("div",{className:"animate-pulse",children:[r.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),r.jsx("div",{className:"h-3 bg-muted rounded w-1/2 mt-2"})]},d))}):n.length>0?r.jsxs("div",{className:"space-y-4",children:[n.map(d=>r.jsx(it,{to:`/proposals/${d.id}`,className:"block",children:r.jsxs("div",{className:"flex items-center space-x-3 p-3 rounded-lg border hover:bg-accent hover:border-accent-foreground/20 transition-colors cursor-pointer",children:[r.jsx("div",{className:"flex-shrink-0",children:r.jsx(ut,{variant:d.status==="approved"||d.status==="code-complete"?"default":d.status==="in-review"?"secondary":d.status==="draft"?"outline":"destructive",children:d.status})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("h4",{className:"text-sm font-medium truncate",children:d.intent}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:[d.author.name," • ",new Date(d.metadata?.updatedAt||d.metadata?.createdAt||"").toLocaleDateString()]})]})]})},d.id)),r.jsx("div",{className:"pt-2",children:r.jsx(re,{variant:"outline",size:"sm",asChild:!0,className:"w-full",children:r.jsx(it,{to:"/proposals",children:"View All Proposals"})})})]}):r.jsxs("div",{className:"text-center py-6",children:[r.jsx(Ku,{className:"mx-auto h-12 w-12 text-muted-foreground/50"}),r.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No proposals yet"}),r.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Create your first change proposal to get started."}),r.jsx(re,{asChild:!0,className:"mt-4",children:r.jsxs(it,{to:"/proposals/new",children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"New Proposal"]})})]})})]}),r.jsxs(Ie,{className:"flex flex-col",children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Quick Actions"}),r.jsx(qt,{children:"Common tasks and operations"})]}),r.jsx(Be,{className:"flex flex-col flex-1",children:r.jsxs("div",{className:"space-y-2",children:[r.jsx(re,{asChild:!0,variant:"default",className:"w-full justify-start",children:r.jsxs(it,{to:"/proposals/new",children:[r.jsx(Ku,{className:"mr-2 h-4 w-4"}),"New Proposal"]})}),r.jsx(re,{asChild:!0,variant:"outline",className:"w-full justify-start",children:r.jsxs(it,{to:"/context/project/edit",children:[r.jsx(Nr,{className:"mr-2 h-4 w-4"}),"Update Project Overview"]})}),r.jsx(re,{asChild:!0,variant:"outline",className:"w-full justify-start",children:r.jsxs(it,{to:"/context/architecture/edit",children:[r.jsx(Li,{className:"mr-2 h-4 w-4"}),"Update Technical Architecture"]})}),r.jsx(re,{asChild:!0,variant:"outline",className:"w-full justify-start",children:r.jsxs(it,{to:"/agents/new",children:[r.jsx(mr,{className:"mr-2 h-4 w-4"}),"Create New Agent"]})}),r.jsx(re,{asChild:!0,variant:"outline",className:"w-full justify-start",children:r.jsxs(it,{to:"/code",children:[r.jsx(ja,{className:"mr-2 h-4 w-4"}),"Start Coding Agent"]})})]})})]})]}),r.jsx(ete,{open:u,onOpenChange:c,workflows:tte})]})}var rte="Label",a6=w.forwardRef((e,t)=>r.jsx(ht.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));a6.displayName=rte;var i6=a6;const ste=fc("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),be=w.forwardRef(({className:e,...t},n)=>r.jsx(i6,{ref:n,className:Te(ste(),e),...t}));be.displayName=i6.displayName;var Mm="Tabs",[ate,ehe]=Fr(Mm,[wc]),o6=wc(),[ite,dE]=ate(Mm),l6=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,onValueChange:a,defaultValue:o,orientation:u="horizontal",dir:c,activationMode:d="automatic",...h}=e,p=vc(c),[m,g]=ia({prop:s,onChange:a,defaultProp:o??"",caller:Mm});return r.jsx(ite,{scope:n,baseId:Ms(),value:m,onValueChange:g,orientation:u,dir:p,activationMode:d,children:r.jsx(ht.div,{dir:p,"data-orientation":u,...h,ref:t})})});l6.displayName=Mm;var c6="TabsList",u6=w.forwardRef((e,t)=>{const{__scopeTabs:n,loop:s=!0,...a}=e,o=dE(c6,n),u=o6(n);return r.jsx(tE,{asChild:!0,...u,orientation:o.orientation,dir:o.dir,loop:s,children:r.jsx(ht.div,{role:"tablist","aria-orientation":o.orientation,...a,ref:t})})});u6.displayName=c6;var d6="TabsTrigger",h6=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,disabled:a=!1,...o}=e,u=dE(d6,n),c=o6(n),d=m6(u.baseId,s),h=g6(u.baseId,s),p=s===u.value;return r.jsx(nE,{asChild:!0,...c,focusable:!a,active:p,children:r.jsx(ht.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":h,"data-state":p?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:d,...o,ref:t,onMouseDown:Ve(e.onMouseDown,m=>{!a&&m.button===0&&m.ctrlKey===!1?u.onValueChange(s):m.preventDefault()}),onKeyDown:Ve(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&u.onValueChange(s)}),onFocus:Ve(e.onFocus,()=>{const m=u.activationMode!=="manual";!p&&!a&&m&&u.onValueChange(s)})})})});h6.displayName=d6;var f6="TabsContent",p6=w.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,forceMount:a,children:o,...u}=e,c=dE(f6,n),d=m6(c.baseId,s),h=g6(c.baseId,s),p=s===c.value,m=w.useRef(p);return w.useEffect(()=>{const g=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(g)},[]),r.jsx(xr,{present:a||p,children:({present:g})=>r.jsx(ht.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":d,hidden:!g,id:h,tabIndex:0,...u,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:g&&o})})});p6.displayName=f6;function m6(e,t){return`${e}-trigger-${t}`}function g6(e,t){return`${e}-content-${t}`}var ote=l6,b6=u6,x6=h6,v6=p6;const Fm=ote,Xd=w.forwardRef(({className:e,...t},n)=>r.jsx(b6,{ref:n,className:Te("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Xd.displayName=b6.displayName;const Yr=w.forwardRef(({className:e,...t},n)=>r.jsx(x6,{ref:n,className:Te("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));Yr.displayName=x6.displayName;const Kr=w.forwardRef(({className:e,...t},n)=>r.jsx(v6,{ref:n,className:Te("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Kr.displayName=v6.displayName;function lte(){const e=In(),t=Mr(),{login:n,register:s,isAuthenticated:a,authEnabled:o,isLoading:u}=uc(),[c,d]=w.useState(!1),[h,p]=w.useState("login"),[m,g]=w.useState(""),[v,C]=w.useState(""),[S,b]=w.useState(""),[y,E]=w.useState(""),[_,N]=w.useState("");w.useEffect(()=>{if(!u){if(!o)e("/");else if(a){const I=t.state?.from?.pathname||"/";e(I,{replace:!0})}}},[o,a,u,e,t]);const A=async I=>{I.preventDefault(),d(!0);try{await n(m,v),Et({title:"Success",description:"Logged in successfully"});const R=t.state?.from?.pathname||"/";e(R,{replace:!0})}catch(R){Et({title:"Login failed",description:R.message||"Invalid email or password",variant:"destructive"})}finally{d(!1)}},k=async I=>{if(I.preventDefault(),y.length<8){Et({title:"Invalid password",description:"Password must be at least 8 characters",variant:"destructive"});return}d(!0);try{await s(S,y,_),Et({title:"Success",description:"Account created successfully"});const R=t.state?.from?.pathname||"/";e(R,{replace:!0})}catch(R){Et({title:"Registration failed",description:R.message||"Failed to create account",variant:"destructive"})}finally{d(!1)}};return u?r.jsx("div",{className:"min-h-screen flex items-center justify-center",children:r.jsx(tn,{className:"h-8 w-8 animate-spin text-muted-foreground"})}):r.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-background to-muted p-4",children:r.jsxs(Ie,{className:"w-full max-w-md",children:[r.jsxs(nt,{className:"space-y-1 text-center",children:[r.jsx("div",{className:"flex justify-center mb-4",children:r.jsx("svg",{className:"h-12 w-12 text-green-600",fill:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z"})})}),r.jsx(st,{className:"text-2xl font-bold",children:"Welcome to Coconut"}),r.jsx(qt,{children:"Sign in to your account or create a new one"})]}),r.jsx(Be,{children:r.jsxs(Fm,{value:h,onValueChange:I=>p(I),children:[r.jsxs(Xd,{className:"grid w-full grid-cols-2",children:[r.jsx(Yr,{value:"login",children:"Login"}),r.jsx(Yr,{value:"register",children:"Register"})]}),r.jsx(Kr,{value:"login",className:"space-y-4",children:r.jsxs("form",{onSubmit:A,className:"space-y-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"login-email",children:"Email"}),r.jsx(Fe,{id:"login-email",type:"email",placeholder:"you@example.com",value:m,onChange:I=>g(I.target.value),required:!0,disabled:c})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"login-password",children:"Password"}),r.jsx(Fe,{id:"login-password",type:"password",value:v,onChange:I=>C(I.target.value),required:!0,disabled:c})]}),r.jsx(re,{type:"submit",className:"w-full",disabled:c,children:c?r.jsxs(r.Fragment,{children:[r.jsx(tn,{className:"mr-2 h-4 w-4 animate-spin"}),"Logging in..."]}):"Login"})]})}),r.jsx(Kr,{value:"register",className:"space-y-4",children:r.jsxs("form",{onSubmit:k,className:"space-y-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"register-email",children:"Email"}),r.jsx(Fe,{id:"register-email",type:"email",placeholder:"you@example.com",value:S,onChange:I=>b(I.target.value),required:!0,disabled:c}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"Only whitelisted emails can register"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"register-name",children:"Name"}),r.jsx(Fe,{id:"register-name",type:"text",placeholder:"Your name",value:_,onChange:I=>N(I.target.value),required:!0,disabled:c})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"register-password",children:"Password"}),r.jsx(Fe,{id:"register-password",type:"password",value:y,onChange:I=>E(I.target.value),required:!0,disabled:c,minLength:8}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"At least 8 characters"})]}),r.jsx(re,{type:"submit",className:"w-full",disabled:c,children:c?r.jsxs(r.Fragment,{children:[r.jsx(tn,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating account..."]}):"Create Account"})]})})]})})]})})}const Al="coconut/github-auth-state";function cte(e){try{window.opener&&window.opener.postMessage({type:"github-auth",...e},window.location.origin)}catch{}}const ute=()=>{const[e,t]=w.useState("pending"),[n,s]=w.useState("Authorizing GitHub…");return w.useEffect(()=>{const a=new URLSearchParams(window.location.search),o=a.get("error"),u=a.get("token"),c=a.get("expires_at")||a.get("expiresAt"),d=a.get("state"),h=g=>{cte(g),t(g.success?"success":"error"),s(g.message),setTimeout(()=>{try{window.close()}catch{}},1200)};if(o){localStorage.removeItem(Al),h({success:!1,message:decodeURIComponent(o)});return}if(!u||!c||!d){localStorage.removeItem(Al),h({success:!1,message:"Missing authorization parameters. Please try again."});return}const p=localStorage.getItem(Al);if(!p||p!==d){localStorage.removeItem(Al),h({success:!1,message:"Authorization state mismatch. Please start again."});return}(async()=>{try{const g=await fetch(`${Ae}/api/v1/git/providers/github/token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:u,expiresAt:c,state:d})}),v=await g.json();if(!g.ok||!v.success)throw new Error(v?.error?.message||"Failed to store GitHub token");localStorage.removeItem(Al),h({success:!0,message:"GitHub connected successfully!",expiresAt:v.data?.expiresAt||c})}catch(g){localStorage.removeItem(Al),h({success:!1,message:g?.message||"Failed to store GitHub token. Please try again."})}})()},[]),r.jsx("div",{className:"flex h-screen items-center justify-center bg-background px-6",children:r.jsxs("div",{className:"max-w-sm rounded-lg border bg-card p-6 text-center shadow-sm",children:[r.jsxs("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-muted",children:[e==="pending"&&r.jsx(tn,{className:"h-6 w-6 animate-spin text-muted-foreground"}),e==="success"&&r.jsx(nm,{className:"h-6 w-6 text-green-600"}),e==="error"&&r.jsx(ey,{className:"h-6 w-6 text-red-600"})]}),r.jsx("h1",{className:"text-lg font-semibold",children:"GitHub Authorization"}),r.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:n}),e!=="pending"&&r.jsx("p",{className:"mt-4 text-xs text-muted-foreground",children:"You can close this window and return to Coconut."})]})})};function Za(e){return Array.isArray?Array.isArray(e):S6(e)==="[object Array]"}function dte(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function hte(e){return e==null?"":dte(e)}function ra(e){return typeof e=="string"}function y6(e){return typeof e=="number"}function fte(e){return e===!0||e===!1||pte(e)&&S6(e)=="[object Boolean]"}function E6(e){return typeof e=="object"}function pte(e){return E6(e)&&e!==null}function cs(e){return e!=null}function i0(e){return!e.trim().length}function S6(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const mte="Incorrect 'index' type",gte=e=>`Invalid value for key ${e}`,bte=e=>`Pattern length exceeds max of ${e}.`,xte=e=>`Missing ${e} property in key`,vte=e=>`Property 'weight' in key '${e}' must be a positive integer`,lR=Object.prototype.hasOwnProperty;class yte{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(s=>{let a=_6(s);this._keys.push(a),this._keyMap[a.id]=a,n+=a.weight}),this._keys.forEach(s=>{s.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function _6(e){let t=null,n=null,s=null,a=1,o=null;if(ra(e)||Za(e))s=e,t=cR(e),n=bv(e);else{if(!lR.call(e,"name"))throw new Error(xte("name"));const u=e.name;if(s=u,lR.call(e,"weight")&&(a=e.weight,a<=0))throw new Error(vte(u));t=cR(u),n=bv(u),o=e.getFn}return{path:t,id:n,weight:a,src:s,getFn:o}}function cR(e){return Za(e)?e:e.split(".")}function bv(e){return Za(e)?e.join("."):e}function Ete(e,t){let n=[],s=!1;const a=(o,u,c)=>{if(cs(o))if(!u[c])n.push(o);else{let d=u[c];const h=o[d];if(!cs(h))return;if(c===u.length-1&&(ra(h)||y6(h)||fte(h)))n.push(hte(h));else if(Za(h)){s=!0;for(let p=0,m=h.length;p<m;p+=1)a(h[p],u,c+1)}else u.length&&a(h,u,c+1)}};return a(e,ra(t)?t.split("."):t,0),s?n:n[0]}const Ste={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},_te={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},wte={location:0,threshold:.6,distance:100},Cte={useExtendedSearch:!1,getFn:Ete,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var _t={..._te,...Ste,...wte,...Cte};const Nte=/[^ ]+/g;function Tte(e=1,t=3){const n=new Map,s=Math.pow(10,t);return{get(a){const o=a.match(Nte).length;if(n.has(o))return n.get(o);const u=1/Math.pow(o,.5*e),c=parseFloat(Math.round(u*s)/s);return n.set(o,c),c},clear(){n.clear()}}}class hE{constructor({getFn:t=_t.getFn,fieldNormWeight:n=_t.fieldNormWeight}={}){this.norm=Tte(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,s)=>{this._keysMap[n.id]=s})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,ra(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();ra(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,s=this.size();n<s;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!cs(t)||i0(t))return;let s={v:t,i:n,n:this.norm.get(t)};this.records.push(s)}_addObject(t,n){let s={i:n,$:{}};this.keys.forEach((a,o)=>{let u=a.getFn?a.getFn(t):this.getFn(t,a.path);if(cs(u)){if(Za(u)){let c=[];const d=[{nestedArrIndex:-1,value:u}];for(;d.length;){const{nestedArrIndex:h,value:p}=d.pop();if(cs(p))if(ra(p)&&!i0(p)){let m={v:p,i:h,n:this.norm.get(p)};c.push(m)}else Za(p)&&p.forEach((m,g)=>{d.push({nestedArrIndex:g,value:m})})}s.$[o]=c}else if(ra(u)&&!i0(u)){let c={v:u,n:this.norm.get(u)};s.$[o]=c}}}),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function w6(e,t,{getFn:n=_t.getFn,fieldNormWeight:s=_t.fieldNormWeight}={}){const a=new hE({getFn:n,fieldNormWeight:s});return a.setKeys(e.map(_6)),a.setSources(t),a.create(),a}function Ate(e,{getFn:t=_t.getFn,fieldNormWeight:n=_t.fieldNormWeight}={}){const{keys:s,records:a}=e,o=new hE({getFn:t,fieldNormWeight:n});return o.setKeys(s),o.setIndexRecords(a),o}function Ff(e,{errors:t=0,currentLocation:n=0,expectedLocation:s=0,distance:a=_t.distance,ignoreLocation:o=_t.ignoreLocation}={}){const u=t/e.length;if(o)return u;const c=Math.abs(s-n);return a?u+c/a:c?1:u}function kte(e=[],t=_t.minMatchCharLength){let n=[],s=-1,a=-1,o=0;for(let u=e.length;o<u;o+=1){let c=e[o];c&&s===-1?s=o:!c&&s!==-1&&(a=o-1,a-s+1>=t&&n.push([s,a]),s=-1)}return e[o-1]&&o-s>=t&&n.push([s,o-1]),n}const po=32;function Rte(e,t,n,{location:s=_t.location,distance:a=_t.distance,threshold:o=_t.threshold,findAllMatches:u=_t.findAllMatches,minMatchCharLength:c=_t.minMatchCharLength,includeMatches:d=_t.includeMatches,ignoreLocation:h=_t.ignoreLocation}={}){if(t.length>po)throw new Error(bte(po));const p=t.length,m=e.length,g=Math.max(0,Math.min(s,m));let v=o,C=g;const S=c>1||d,b=S?Array(m):[];let y;for(;(y=e.indexOf(t,C))>-1;){let I=Ff(t,{currentLocation:y,expectedLocation:g,distance:a,ignoreLocation:h});if(v=Math.min(I,v),C=y+p,S){let R=0;for(;R<p;)b[y+R]=1,R+=1}}C=-1;let E=[],_=1,N=p+m;const A=1<<p-1;for(let I=0;I<p;I+=1){let R=0,M=N;for(;R<M;)Ff(t,{errors:I,currentLocation:g+M,expectedLocation:g,distance:a,ignoreLocation:h})<=v?R=M:N=M,M=Math.floor((N-R)/2+R);N=M;let L=Math.max(1,g-M+1),$=u?m:Math.min(g+M,m)+p,H=Array($+2);H[$+1]=(1<<I)-1;for(let z=$;z>=L;z-=1){let Q=z-1,P=n[e.charAt(Q)];if(S&&(b[Q]=+!!P),H[z]=(H[z+1]<<1|1)&P,I&&(H[z]|=(E[z+1]|E[z])<<1|1|E[z+1]),H[z]&A&&(_=Ff(t,{errors:I,currentLocation:Q,expectedLocation:g,distance:a,ignoreLocation:h}),_<=v)){if(v=_,C=Q,C<=g)break;L=Math.max(1,2*g-C)}}if(Ff(t,{errors:I+1,currentLocation:g,expectedLocation:g,distance:a,ignoreLocation:h})>v)break;E=H}const k={isMatch:C>=0,score:Math.max(.001,_)};if(S){const I=kte(b,c);I.length?d&&(k.indices=I):k.isMatch=!1}return k}function Dte(e){let t={};for(let n=0,s=e.length;n<s;n+=1){const a=e.charAt(n);t[a]=(t[a]||0)|1<<s-n-1}return t}const Lp=String.prototype.normalize?(e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(e=>e);class C6{constructor(t,{location:n=_t.location,threshold:s=_t.threshold,distance:a=_t.distance,includeMatches:o=_t.includeMatches,findAllMatches:u=_t.findAllMatches,minMatchCharLength:c=_t.minMatchCharLength,isCaseSensitive:d=_t.isCaseSensitive,ignoreDiacritics:h=_t.ignoreDiacritics,ignoreLocation:p=_t.ignoreLocation}={}){if(this.options={location:n,threshold:s,distance:a,includeMatches:o,findAllMatches:u,minMatchCharLength:c,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:p},t=d?t:t.toLowerCase(),t=h?Lp(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const m=(v,C)=>{this.chunks.push({pattern:v,alphabet:Dte(v),startIndex:C})},g=this.pattern.length;if(g>po){let v=0;const C=g%po,S=g-C;for(;v<S;)m(this.pattern.substr(v,po),v),v+=po;if(C){const b=g-po;m(this.pattern.substr(b),b)}}else m(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:s,includeMatches:a}=this.options;if(t=n?t:t.toLowerCase(),t=s?Lp(t):t,this.pattern===t){let S={isMatch:!0,score:0};return a&&(S.indices=[[0,t.length-1]]),S}const{location:o,distance:u,threshold:c,findAllMatches:d,minMatchCharLength:h,ignoreLocation:p}=this.options;let m=[],g=0,v=!1;this.chunks.forEach(({pattern:S,alphabet:b,startIndex:y})=>{const{isMatch:E,score:_,indices:N}=Rte(t,S,b,{location:o+y,distance:u,threshold:c,findAllMatches:d,minMatchCharLength:h,includeMatches:a,ignoreLocation:p});E&&(v=!0),g+=_,E&&N&&(m=[...m,...N])});let C={isMatch:v,score:v?g/this.chunks.length:1};return v&&a&&(C.indices=m),C}}class Gi{constructor(t){this.pattern=t}static isMultiMatch(t){return uR(t,this.multiRegex)}static isSingleMatch(t){return uR(t,this.singleRegex)}search(){}}function uR(e,t){const n=e.match(t);return n?n[1]:null}class Ite extends Gi{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class jte extends Gi{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const s=t.indexOf(this.pattern)===-1;return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}}class Ote extends Gi{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class Lte extends Gi{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class Mte extends Gi{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class Fte extends Gi{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class N6 extends Gi{constructor(t,{location:n=_t.location,threshold:s=_t.threshold,distance:a=_t.distance,includeMatches:o=_t.includeMatches,findAllMatches:u=_t.findAllMatches,minMatchCharLength:c=_t.minMatchCharLength,isCaseSensitive:d=_t.isCaseSensitive,ignoreDiacritics:h=_t.ignoreDiacritics,ignoreLocation:p=_t.ignoreLocation}={}){super(t),this._bitapSearch=new C6(t,{location:n,threshold:s,distance:a,includeMatches:o,findAllMatches:u,minMatchCharLength:c,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:p})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class T6 extends Gi{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,s;const a=[],o=this.pattern.length;for(;(s=t.indexOf(this.pattern,n))>-1;)n=s+o,a.push([s,n-1]);const u=!!a.length;return{isMatch:u,score:u?0:1,indices:a}}}const xv=[Ite,T6,Ote,Lte,Fte,Mte,jte,N6],dR=xv.length,Pte=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Bte="|";function Ute(e,t={}){return e.split(Bte).map(n=>{let s=n.trim().split(Pte).filter(o=>o&&!!o.trim()),a=[];for(let o=0,u=s.length;o<u;o+=1){const c=s[o];let d=!1,h=-1;for(;!d&&++h<dR;){const p=xv[h];let m=p.isMultiMatch(c);m&&(a.push(new p(m,t)),d=!0)}if(!d)for(h=-1;++h<dR;){const p=xv[h];let m=p.isSingleMatch(c);if(m){a.push(new p(m,t));break}}}return a})}const Hte=new Set([N6.type,T6.type]);class $te{constructor(t,{isCaseSensitive:n=_t.isCaseSensitive,ignoreDiacritics:s=_t.ignoreDiacritics,includeMatches:a=_t.includeMatches,minMatchCharLength:o=_t.minMatchCharLength,ignoreLocation:u=_t.ignoreLocation,findAllMatches:c=_t.findAllMatches,location:d=_t.location,threshold:h=_t.threshold,distance:p=_t.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:s,includeMatches:a,minMatchCharLength:o,findAllMatches:c,ignoreLocation:u,location:d,threshold:h,distance:p},t=n?t:t.toLowerCase(),t=s?Lp(t):t,this.pattern=t,this.query=Ute(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:a,ignoreDiacritics:o}=this.options;t=a?t:t.toLowerCase(),t=o?Lp(t):t;let u=0,c=[],d=0;for(let h=0,p=n.length;h<p;h+=1){const m=n[h];c.length=0,u=0;for(let g=0,v=m.length;g<v;g+=1){const C=m[g],{isMatch:S,indices:b,score:y}=C.search(t);if(S){if(u+=1,d+=y,s){const E=C.constructor.type;Hte.has(E)?c=[...c,...b]:c.push(b)}}else{d=0,u=0,c.length=0;break}}if(u){let g={isMatch:!0,score:d/u};return s&&(g.indices=c),g}}return{isMatch:!1,score:1}}}const vv=[];function zte(...e){vv.push(...e)}function yv(e,t){for(let n=0,s=vv.length;n<s;n+=1){let a=vv[n];if(a.condition(e,t))return new a(e,t)}return new C6(e,t)}const Mp={AND:"$and",OR:"$or"},Ev={PATH:"$path",PATTERN:"$val"},Sv=e=>!!(e[Mp.AND]||e[Mp.OR]),Gte=e=>!!e[Ev.PATH],qte=e=>!Za(e)&&E6(e)&&!Sv(e),hR=e=>({[Mp.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function A6(e,t,{auto:n=!0}={}){const s=a=>{let o=Object.keys(a);const u=Gte(a);if(!u&&o.length>1&&!Sv(a))return s(hR(a));if(qte(a)){const d=u?a[Ev.PATH]:o[0],h=u?a[Ev.PATTERN]:a[d];if(!ra(h))throw new Error(gte(d));const p={keyId:bv(d),pattern:h};return n&&(p.searcher=yv(h,t)),p}let c={children:[],operator:o[0]};return o.forEach(d=>{const h=a[d];Za(h)&&h.forEach(p=>{c.children.push(s(p))})}),c};return Sv(e)||(e=hR(e)),s(e)}function Wte(e,{ignoreFieldNorm:t=_t.ignoreFieldNorm}){e.forEach(n=>{let s=1;n.matches.forEach(({key:a,norm:o,score:u})=>{const c=a?a.weight:null;s*=Math.pow(u===0&&c?Number.EPSILON:u,(c||1)*(t?1:o))}),n.score=s})}function Vte(e,t){const n=e.matches;t.matches=[],cs(n)&&n.forEach(s=>{if(!cs(s.indices)||!s.indices.length)return;const{indices:a,value:o}=s;let u={indices:a,value:o};s.key&&(u.key=s.key.src),s.idx>-1&&(u.refIndex=s.idx),t.matches.push(u)})}function Yte(e,t){t.score=e.score}function Kte(e,t,{includeMatches:n=_t.includeMatches,includeScore:s=_t.includeScore}={}){const a=[];return n&&a.push(Vte),s&&a.push(Yte),e.map(o=>{const{idx:u}=o,c={item:t[u],refIndex:u};return a.length&&a.forEach(d=>{d(o,c)}),c})}class Cc{constructor(t,n={},s){this.options={..._t,...n},this.options.useExtendedSearch,this._keyStore=new yte(this.options.keys),this.setCollection(t,s)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof hE))throw new Error(mte);this._myIndex=n||w6(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){cs(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let s=0,a=this._docs.length;s<a;s+=1){const o=this._docs[s];t(o,s)&&(this.removeAt(s),s-=1,a-=1,n.push(o))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:s,includeScore:a,shouldSort:o,sortFn:u,ignoreFieldNorm:c}=this.options;let d=ra(t)?ra(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return Wte(d,{ignoreFieldNorm:c}),o&&d.sort(u),y6(n)&&n>-1&&(d=d.slice(0,n)),Kte(d,this._docs,{includeMatches:s,includeScore:a})}_searchStringList(t){const n=yv(t,this.options),{records:s}=this._myIndex,a=[];return s.forEach(({v:o,i:u,n:c})=>{if(!cs(o))return;const{isMatch:d,score:h,indices:p}=n.searchIn(o);d&&a.push({item:o,idx:u,matches:[{score:h,value:o,norm:c,indices:p}]})}),a}_searchLogical(t){const n=A6(t,this.options),s=(c,d,h)=>{if(!c.children){const{keyId:m,searcher:g}=c,v=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(d,m),searcher:g});return v&&v.length?[{idx:h,item:d,matches:v}]:[]}const p=[];for(let m=0,g=c.children.length;m<g;m+=1){const v=c.children[m],C=s(v,d,h);if(C.length)p.push(...C);else if(c.operator===Mp.AND)return[]}return p},a=this._myIndex.records,o={},u=[];return a.forEach(({$:c,i:d})=>{if(cs(c)){let h=s(n,c,d);h.length&&(o[d]||(o[d]={idx:d,item:c,matches:[]},u.push(o[d])),h.forEach(({matches:p})=>{o[d].matches.push(...p)}))}}),u}_searchObjectList(t){const n=yv(t,this.options),{keys:s,records:a}=this._myIndex,o=[];return a.forEach(({$:u,i:c})=>{if(!cs(u))return;let d=[];s.forEach((h,p)=>{d.push(...this._findMatches({key:h,value:u[p],searcher:n}))}),d.length&&o.push({idx:c,item:u,matches:d})}),o}_findMatches({key:t,value:n,searcher:s}){if(!cs(n))return[];let a=[];if(Za(n))n.forEach(({v:o,i:u,n:c})=>{if(!cs(o))return;const{isMatch:d,score:h,indices:p}=s.searchIn(o);d&&a.push({score:h,key:t,value:o,idx:u,norm:c,indices:p})});else{const{v:o,n:u}=n,{isMatch:c,score:d,indices:h}=s.searchIn(o);c&&a.push({score:d,key:t,value:o,norm:u,indices:h})}return a}}Cc.version="7.1.0";Cc.createIndex=w6;Cc.parseIndex=Ate;Cc.config=_t;Cc.parseQuery=A6;zte($te);function Xte(e){switch(e){case"approved":case"code-complete":return"default";case"in-review":return"secondary";case"rejected":return"destructive";default:return"outline"}}function Zte(e){switch(e){case"high":case"critical":return"destructive";case"medium":return"secondary";default:return"outline"}}function Qte(){const[e]=EB(),t=In(),n=Mr(),[s,a]=w.useState([]),[o,u]=w.useState([]),[c,d]=w.useState(!0),[h,p]=w.useState(null),[m,g]=w.useState(e.get("status")||"active"),[v,C]=w.useState(e.get("priority")||"all"),[S,b]=w.useState(e.get("search")||""),[y,E]=w.useState(!!e.get("search")),[_,N]=w.useState(e.get("sortBy")||"created"),[A,k]=w.useState(e.get("order")||"desc"),I=w.useRef(null),R=w.useCallback(P=>{const X=new URLSearchParams(e);Object.entries(P).forEach(([O,V])=>{V&&V!=="all"&&V!=="active"&&V!==""?X.set(O,V):X.delete(O)});const Y=X.toString(),F=Y?`?${Y}`:"";t(`${n.pathname}${F}`)},[e,t,n.pathname]),M=w.useCallback(P=>{g(P),R({status:P==="active"?null:P})},[R]),L=w.useCallback(P=>{C(P),R({priority:P==="all"?null:P})},[R]),$=w.useCallback(P=>{b(P),R({search:P||null})},[R]),H=w.useCallback(P=>{N(P),R({sortBy:P==="created"?null:P})},[R]),B=w.useCallback(()=>{const P=A==="asc"?"desc":"asc";k(P),R({order:P==="desc"?null:P})},[A,R]),z=w.useCallback(P=>{if(P.key==="s"||P.key==="S"){const X=document.activeElement;X?.tagName==="INPUT"||X?.tagName==="TEXTAREA"||X?.getAttribute("contenteditable")==="true"||(P.preventDefault(),E(!0),setTimeout(()=>{I.current?.focus()},0))}},[]);w.useEffect(()=>(document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}),[z]);const Q=w.useMemo(()=>{const P={keys:[{name:"intent",weight:.4},{name:"id",weight:.3},{name:"author.name",weight:.2},{name:"metadata.tags",weight:.1}],threshold:.3,includeScore:!0};return new Cc(s,P)},[s]);return w.useEffect(()=>{async function P(){try{d(!0);const Y=await(await fetch(`${Ae}/api/v1/proposals`)).json();Y.success?(a(Y.data),u(Y.data)):p(Y.error?.message||"Failed to fetch proposals")}catch(X){p(X instanceof Error?X.message:"Unknown error")}finally{d(!1)}}P()},[]),w.useEffect(()=>{let P=s;if(m==="active"?P=P.filter(X=>["draft","proposed","in-review","approved","code-complete"].includes(X.status)):m==="approved"?P=P.filter(X=>["approved","code-complete"].includes(X.status)):m!=="all"&&(P=P.filter(X=>X.status===m)),v!=="all"&&(P=P.filter(X=>X.metadata.priority===v)),S.trim()){const X=Q.search(S),Y=new Set(X.map(F=>F.item.id));P=P.filter(F=>Y.has(F.id))}P=P.sort((X,Y)=>{let F,O;switch(_){case"created":{F=new Date(X.metadata.createdAt).getTime(),O=new Date(Y.metadata.createdAt).getTime();break}case"updated":{F=new Date(X.metadata.updatedAt).getTime(),O=new Date(Y.metadata.updatedAt).getTime();break}case"status":{F=X.status,O=Y.status;break}case"priority":{const V={critical:4,high:3,medium:2,low:1};F=V[X.metadata.priority]||0,O=V[Y.metadata.priority]||0;break}case"intent":{F=X.intent.toLowerCase(),O=Y.intent.toLowerCase();break}default:F=new Date(X.metadata.createdAt).getTime(),O=new Date(Y.metadata.createdAt).getTime()}return A==="asc"?F<O?-1:F>O?1:0:F>O?-1:F<O?1:0}),u(P)},[s,m,v,S,_,A,Q]),c?r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Proposals"}),r.jsx("p",{className:"text-muted-foreground",children:"Manage change proposals for your project"})]}),r.jsx(re,{asChild:!0,children:r.jsxs(it,{to:"/proposals/new",children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"New Proposal"]})})]}),r.jsx("div",{className:"space-y-4",children:[...Array(3)].map((P,X)=>r.jsx(Ie,{children:r.jsx(nt,{children:r.jsxs("div",{className:"flex justify-between items-start",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"h-6 bg-muted rounded w-3/4 animate-pulse"}),r.jsx("div",{className:"h-4 bg-muted rounded w-1/2 animate-pulse"})]}),r.jsx("div",{className:"h-6 bg-muted rounded w-20 animate-pulse"})]})})},X))})]}):h?r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Proposals"}),r.jsx("p",{className:"text-muted-foreground",children:"Manage change proposals for your project"})]}),r.jsx(re,{asChild:!0,children:r.jsxs(it,{to:"/proposals/new",children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"New Proposal"]})})]}),r.jsx(Ie,{children:r.jsx(Be,{className:"pt-6",children:r.jsx("div",{className:"text-center",children:r.jsxs("p",{className:"text-destructive",children:["Error: ",h]})})})})]}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Proposals"}),r.jsx("p",{className:"text-muted-foreground",children:"Manage change proposals for your project"})]}),r.jsx(re,{asChild:!0,children:r.jsxs(it,{to:"/proposals/new",children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"New Proposal"]})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex gap-2 flex-wrap justify-between",children:[r.jsxs("div",{className:"flex gap-2 flex-wrap",children:[r.jsxs(Zt,{value:m,onValueChange:M,children:[r.jsxs(Wt,{className:"w-[180px]",children:[r.jsx(Rx,{className:"mr-2 h-4 w-4"}),r.jsx(Qt,{placeholder:"Filter by status"})]}),r.jsxs(Vt,{children:[r.jsx(Le,{value:"active",children:"Active (Default)"}),r.jsx(Le,{value:"all",children:"All statuses"}),r.jsx(Le,{value:"draft",children:"Draft"}),r.jsx(Le,{value:"proposed",children:"Proposed"}),r.jsx(Le,{value:"in-review",children:"In Review"}),r.jsx(Le,{value:"approved",children:"Approved"}),r.jsx(Le,{value:"code-complete",children:"Code Complete"}),r.jsx(Le,{value:"merged",children:"Merged"}),r.jsx(Le,{value:"rejected",children:"Rejected"})]})]}),r.jsxs(Zt,{value:v,onValueChange:L,children:[r.jsxs(Wt,{className:"w-[180px]",children:[r.jsx(Rx,{className:"mr-2 h-4 w-4"}),r.jsx(Qt,{placeholder:"Filter by priority"})]}),r.jsxs(Vt,{children:[r.jsx(Le,{value:"all",children:"All priorities"}),r.jsx(Le,{value:"low",children:"Low"}),r.jsx(Le,{value:"medium",children:"Medium"}),r.jsx(Le,{value:"high",children:"High"}),r.jsx(Le,{value:"critical",children:"Critical"})]})]}),r.jsxs(Zt,{value:_,onValueChange:P=>H(P),children:[r.jsxs(Wt,{className:"w-[140px]",children:[r.jsx(l9,{className:"mr-2 h-4 w-4"}),r.jsx(Qt,{})]}),r.jsxs(Vt,{children:[r.jsx(Le,{value:"created",children:"Created"}),r.jsx(Le,{value:"updated",children:"Updated"}),r.jsx(Le,{value:"status",children:"Status"}),r.jsx(Le,{value:"priority",children:"Priority"}),r.jsx(Le,{value:"intent",children:"Title"})]})]}),r.jsx(re,{variant:"outline",size:"sm",onClick:B,className:"min-w-[80px]",children:A==="asc"?r.jsxs(r.Fragment,{children:[r.jsx(u9,{className:"mr-2 h-4 w-4"}),"Asc"]}):r.jsxs(r.Fragment,{children:[r.jsx(s9,{className:"mr-2 h-4 w-4"}),"Desc"]})})]}),r.jsxs(re,{variant:"outline",size:"sm",onClick:()=>{E(!y),y||setTimeout(()=>{I.current?.focus()},0)},className:y?"bg-green-600 text-white hover:bg-green-700 border-green-600":"",children:[r.jsx(ny,{className:"mr-2 h-4 w-4"}),"Search"]})]}),y&&r.jsxs("div",{className:"flex gap-2",children:[r.jsx(Fe,{ref:I,placeholder:"Search proposals by title, ID, author, or tags...",value:S,onChange:P=>$(P.target.value),className:"flex-1"}),S&&r.jsx(re,{variant:"outline",size:"sm",onClick:()=>$(""),children:"Clear"})]})]}),o.length===0&&s.length>0?r.jsx(Ie,{children:r.jsx(Be,{className:"pt-6",children:r.jsxs("div",{className:"text-center py-6",children:[r.jsx(Rx,{className:"mx-auto h-12 w-12 text-muted-foreground/50"}),r.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No proposals match your filters"}),r.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Try adjusting your status or priority filters."}),r.jsx(re,{variant:"outline",className:"mt-4",onClick:()=>{M("active"),L("all"),$(""),E(!1)},children:"Clear Filters"})]})})}):s.length===0?r.jsx(Ie,{children:r.jsx(Be,{className:"pt-6",children:r.jsxs("div",{className:"text-center py-6",children:[r.jsx(Ri,{className:"mx-auto h-12 w-12 text-muted-foreground/50"}),r.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No proposals yet"}),r.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Create your first change proposal to get started."}),r.jsx(re,{asChild:!0,className:"mt-4",children:r.jsxs(it,{to:"/proposals/new",children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"New Proposal"]})})]})})}):r.jsx("div",{className:"space-y-4",children:o.map(P=>r.jsx(it,{to:`/proposals/${P.id}`,className:"block",children:r.jsx(Ie,{className:"hover:shadow-md hover:bg-muted/30 transition-all cursor-pointer",children:r.jsx(Be,{className:"py-4",children:r.jsx("div",{className:"flex justify-between items-start gap-4",children:r.jsxs("div",{className:"flex-1 space-y-2",children:[r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsx(st,{className:"text-base leading-tight",children:P.intent}),r.jsxs("div",{className:"flex gap-1 ml-3 flex-shrink-0",children:[P.metadata.priority&&r.jsx(ut,{variant:Zte(P.metadata.priority),className:"text-xs",children:P.metadata.priority}),r.jsx(ut,{variant:Xte(P.status),className:"text-xs",children:P.status})]})]}),P.content&&r.jsxs("div",{className:"text-sm text-muted-foreground leading-relaxed",children:[P.content.split(`
|
|
759
759
|
`).slice(0,2).join(" ").substring(0,150),P.content.length>150?"...":""]}),r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsxs("div",{className:"text-xs text-muted-foreground",children:[P.id," • by ",P.author.name," • ",new Date(P.metadata.createdAt).toLocaleDateString()]}),r.jsxs("div",{className:"flex gap-3 text-xs text-muted-foreground",children:[P.planSteps.length>0&&r.jsxs("span",{children:[P.planSteps.length," step",P.planSteps.length!==1?"s":""]}),P.evidence.length>0&&r.jsxs("span",{children:[P.evidence.length," evidence"]}),P.metadata.tags&&P.metadata.tags.length>0&&r.jsxs("span",{children:[P.metadata.tags.length," tag",P.metadata.tags.length!==1?"s":""]})]})]}),P.metadata.tags&&P.metadata.tags.length>0&&r.jsxs("div",{className:"flex gap-1 mt-2",children:[P.metadata.tags.slice(0,3).map(X=>r.jsx(ut,{variant:"outline",className:"text-xs",children:X},X)),P.metadata.tags.length>3&&r.jsxs(ut,{variant:"outline",className:"text-xs",children:["+",P.metadata.tags.length-3]})]})]})})})})},P.id))})]})}async function Us(e){if(navigator.clipboard?.writeText){await navigator.clipboard.writeText(e);return}if(document.execCommand){const t=document.createElement("textarea");t.value=e,t.style.position="fixed",t.style.left="-999999px",t.style.top="-999999px",document.body.appendChild(t),t.focus(),t.select();try{const n=document.execCommand("copy");if(document.body.removeChild(t),!n)throw new Error("execCommand failed")}catch{throw document.body.removeChild(t),new Error("Fallback copy failed")}return}throw new Error("Clipboard API not available")}function fR(e){switch(e){case"approved":case"code-complete":return"default";case"in-review":return"secondary";case"rejected":return"destructive";default:return"outline"}}function pR(e){switch(e){case"high":case"critical":return"destructive";case"medium":return"secondary";default:return"outline"}}function Jte(){const{id:e}=Ao(),t=In(),[n,s]=w.useState(null),[a,o]=w.useState(!0),[u,c]=w.useState(null),[d,h]=w.useState(!1),[p,m]=w.useState(!1),[g,v]=w.useState(!1),[C,S]=w.useState(""),[b,y]=w.useState(!1),[E,_]=w.useState(!1),[N,A]=w.useState("draft"),[k,I]=w.useState(!1),{toast:R}=bn();w.useEffect(()=>{async function B(){if(e)try{o(!0);const Q=await(await fetch(`${Ae}/api/v1/proposals/${e}`)).json();Q.success?s(Q.data):c(Q.error?.message||"Failed to fetch proposal")}catch(z){c(z instanceof Error?z.message:"Unknown error")}finally{o(!1)}}B()},[e]);const M=async()=>{if(e){h(!0);try{const z=await(await fetch(`${Ae}/api/v1/proposals/${e}`,{method:"DELETE"})).json();z.success?t("/proposals"):alert(z.error?.message||"Failed to delete proposal")}catch(B){alert(`Error deleting proposal: ${B instanceof Error?B.message:"Unknown error"}`)}finally{h(!1)}}},L=async()=>{if(!(!n||!e||N===n.status)){m(!0);try{const z=await(await fetch(`${Ae}/api/v1/proposals/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:N})})).json();z.success?(s(z.data),y(!1)):alert(z.error?.message||"Failed to update status")}catch(B){alert(`Error updating status: ${B instanceof Error?B.message:"Unknown error"}`)}finally{m(!1)}}},$=async()=>{if(!(!n||!e||!C.trim())){v(!0);try{const B={id:`comment-${Date.now()}`,text:C,author:"current-user",timestamp:new Date().toISOString()},z=[...n.metadata.comments||[],B],P=await(await fetch(`${Ae}/api/v1/proposals/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comments:z})})).json();P.success?(s(P.data),S(""),_(!1)):alert(P.error?.message||"Failed to add comment")}catch(B){alert(`Error adding comment: ${B instanceof Error?B.message:"Unknown error"}`)}finally{v(!1)}}},H=()=>{if(!n)return;const B={...n,exportedAt:new Date().toISOString()},z=new Blob([JSON.stringify(B,null,2)],{type:"application/json"}),Q=URL.createObjectURL(z),P=document.createElement("a");P.href=Q,P.download=`proposal-${n.id}.json`,document.body.appendChild(P),P.click(),document.body.removeChild(P),URL.revokeObjectURL(Q)};return a?r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("div",{className:"h-8 bg-muted rounded w-3/4 animate-pulse"}),r.jsx("div",{className:"flex items-center gap-2",children:r.jsx(re,{variant:"ghost",size:"sm",asChild:!0,className:"px-2 hover:bg-transparent",children:r.jsx(it,{to:"/proposals",className:"flex items-center text-muted-foreground hover:text-foreground transition-colors",children:r.jsx(Xn,{className:"h-4 w-4"})})})})]}),r.jsxs(Ie,{children:[r.jsx(nt,{children:r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"h-8 bg-muted rounded w-3/4 animate-pulse"}),r.jsx("div",{className:"h-4 bg-muted rounded w-1/2 animate-pulse"})]})}),r.jsx(Be,{children:r.jsxs("div",{className:"space-y-3",children:[r.jsx("div",{className:"h-4 bg-muted rounded animate-pulse"}),r.jsx("div",{className:"h-4 bg-muted rounded w-5/6 animate-pulse"}),r.jsx("div",{className:"h-4 bg-muted rounded w-4/6 animate-pulse"})]})})]})]}):u||!n?r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("div",{children:r.jsx("h3",{className:"text-lg font-semibold text-destructive",children:u||"Proposal not found"})}),r.jsx("div",{className:"flex items-center gap-2",children:r.jsx(re,{variant:"ghost",size:"sm",asChild:!0,className:"px-2 hover:bg-transparent",children:r.jsx(it,{to:"/proposals",className:"flex items-center text-muted-foreground hover:text-foreground transition-colors",children:r.jsx(Xn,{className:"h-4 w-4"})})})})]}),r.jsx(Ie,{children:r.jsx(Be,{className:"pt-6",children:r.jsxs("div",{className:"text-center",children:[r.jsx("h3",{className:"text-lg font-semibold text-destructive",children:u||"Proposal not found"}),r.jsxs("p",{className:"text-muted-foreground mt-2",children:['The proposal with ID "',e,'" could not be found.']}),r.jsx(re,{asChild:!0,className:"mt-4",children:r.jsx(it,{to:"/proposals",children:"Back to Proposals"})})]})})})]}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("div",{className:"flex items-center gap-4",children:r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:n.intent}),r.jsxs("button",{type:"button",onClick:async()=>{const B=`.nut/proposals/${n.id}.md`;try{await Us(B),I(!0),R({title:"Copied!",description:`${B} copied to clipboard`}),setTimeout(()=>I(!1),2e3)}catch(z){console.error("Failed to copy path:",z),R({title:"Error",description:"Failed to copy to clipboard",variant:"destructive"})}},className:"inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors font-mono",children:[r.jsx("span",{children:`.nut/proposals/${n.id}.md`}),k?r.jsx(jd,{className:"h-3.5 w-3.5"}):r.jsx(Od,{className:"h-3.5 w-3.5"})]})]})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(re,{variant:"ghost",size:"sm",asChild:!0,children:r.jsx(it,{to:"/proposals",className:"flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",children:r.jsx(Xn,{className:"h-4 w-4"})})}),r.jsx(re,{variant:"outline",size:"sm",asChild:!0,children:r.jsxs(it,{to:`/proposals/${e}/edit`,children:[r.jsx(Qa,{className:"h-4 w-4 mr-2"}),"Edit"]})}),r.jsxs(Oi,{children:[r.jsx(tc,{asChild:!0,children:r.jsxs(re,{variant:"outline",size:"sm",disabled:d,children:[r.jsx(Sn,{className:"h-4 w-4 mr-2"}),d?"Deleting...":"Delete"]})}),r.jsxs(Pa,{children:[r.jsxs(Ba,{children:[r.jsx(Ha,{children:"Are you absolutely sure?"}),r.jsxs($a,{children:["This action cannot be undone. This will permanently delete the change proposal",r.jsxs("span",{className:"font-semibold",children:[' "',n.intent,'"']})," and remove it from the system."]})]}),r.jsxs(Ua,{children:[r.jsx(Ga,{children:"Cancel"}),r.jsx(za,{onClick:M,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete Proposal"})]})]})]})]})]}),r.jsxs("div",{className:"grid gap-6 lg:grid-cols-3",children:[r.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[r.jsxs(Ie,{children:[r.jsx(nt,{children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(st,{children:"Proposal Details"}),r.jsxs("div",{className:"flex gap-2",children:[n.metadata.priority&&r.jsx(ut,{variant:pR(n.metadata.priority),children:n.metadata.priority}),r.jsx(ut,{variant:fR(n.status),children:n.status})]})]})}),r.jsx(Be,{className:"space-y-4",children:n.content?r.jsx(Xr,{children:n.content}):r.jsx("p",{className:"text-muted-foreground",children:"No detailed content available for this proposal."})})]}),n.planSteps&&n.planSteps.length>0&&r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Implementation Steps"}),r.jsxs(qt,{children:[n.planSteps.length," step",n.planSteps.length!==1?"s":""," planned"]})]}),r.jsx(Be,{children:r.jsx("div",{className:"space-y-3",children:n.planSteps.map((B,z)=>r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-muted text-xs font-medium",children:z+1}),r.jsxs("div",{className:"flex-1",children:[r.jsx("p",{className:"font-medium",children:B.description}),r.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:r.jsx(ut,{variant:"outline",className:"text-xs",children:B.status})})]})]},B.id))})})]}),n.metadata.comments&&n.metadata.comments.length>0&&r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Comments"}),r.jsxs(qt,{children:[n.metadata.comments.length," comment",n.metadata.comments.length!==1?"s":""]})]}),r.jsx(Be,{children:r.jsx("div",{className:"space-y-4",children:n.metadata.comments.map((B,z)=>r.jsxs("div",{className:"border-l-2 border-muted pl-4 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[r.jsx(U0,{className:"h-3 w-3"}),r.jsx("span",{children:B.author}),r.jsx("span",{children:"•"}),r.jsx("span",{children:new Date(B.timestamp).toLocaleString()})]}),r.jsx(Xr,{className:"prose-sm prose-p:mb-2 prose-ul:my-2 prose-ol:my-2",children:B.text})]},B.id||z))})})]})]}),r.jsxs("div",{className:"space-y-6",children:[r.jsxs(Ie,{children:[r.jsx(nt,{children:r.jsx(st,{children:"Proposal Actions"})}),r.jsxs(Be,{className:"space-y-2",children:[r.jsx(re,{variant:"default",className:"w-full justify-start",asChild:!0,children:r.jsxs(it,{to:`/terminal/${e}`,children:[r.jsx(ja,{className:"h-4 w-4 mr-2"}),"Prepare Coding Agent"]})}),r.jsxs(fn,{open:b,onOpenChange:y,children:[r.jsx(Cp,{asChild:!0,children:r.jsx(re,{variant:"outline",className:"w-full justify-start",onClick:()=>A(n?.status||"draft"),children:"Change Status"})}),r.jsxs(ln,{children:[r.jsxs(nn,{children:[r.jsx(rn,{children:"Change Proposal Status"}),r.jsx(_n,{children:"Update the status of this change proposal."})]}),r.jsx("div",{className:"space-y-4",children:r.jsxs("div",{children:[r.jsx(be,{htmlFor:"status",children:"Status"}),r.jsxs(Zt,{value:N,onValueChange:B=>A(B),children:[r.jsx(Wt,{children:r.jsx(Qt,{placeholder:"Select status"})}),r.jsxs(Vt,{children:[r.jsx(Le,{value:"draft",children:"Draft"}),r.jsx(Le,{value:"proposed",children:"Proposed"}),r.jsx(Le,{value:"in-review",children:"In Review"}),r.jsx(Le,{value:"approved",children:"Approved"}),r.jsx(Le,{value:"code-complete",children:"Code Complete"}),r.jsx(Le,{value:"merged",children:"Merged"}),r.jsx(Le,{value:"rejected",children:"Rejected"})]})]})]})}),r.jsxs(lr,{children:[r.jsx(re,{variant:"outline",onClick:()=>y(!1),children:"Cancel"}),r.jsx(re,{onClick:L,disabled:p||N===n?.status,children:p?"Updating...":"Update Status"})]})]})]}),r.jsxs(fn,{open:E,onOpenChange:_,children:[r.jsx(Cp,{asChild:!0,children:r.jsx(re,{variant:"outline",className:"w-full justify-start",children:"Add Comment"})}),r.jsxs(ln,{children:[r.jsxs(nn,{children:[r.jsx(rn,{children:"Add Comment"}),r.jsx(_n,{children:"Add a comment to this change proposal."})]}),r.jsx("div",{className:"space-y-4",children:r.jsxs("div",{children:[r.jsx(be,{htmlFor:"comment",children:"Comment"}),r.jsx(ar,{id:"comment",placeholder:"Enter your comment...",value:C,onChange:B=>S(B.target.value),rows:4})]})}),r.jsxs(lr,{children:[r.jsx(re,{variant:"outline",onClick:()=>{_(!1),S("")},children:"Cancel"}),r.jsx(re,{onClick:$,disabled:g||!C.trim(),children:g?"Adding...":"Add Comment"})]})]})]}),r.jsxs(re,{variant:"outline",className:"w-full justify-start",onClick:H,children:[r.jsx(ud,{className:"h-4 w-4 mr-2"}),"Export"]})]})]}),r.jsxs(Ie,{children:[r.jsx(nt,{children:r.jsx(st,{children:"Information"})}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[r.jsx(U0,{className:"h-4 w-4 text-muted-foreground"}),r.jsx("span",{className:"font-medium",children:"Author:"}),r.jsx("span",{children:n.author.name})]}),r.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[r.jsx(em,{className:"h-4 w-4 text-muted-foreground"}),r.jsx("span",{className:"font-medium",children:"Created:"}),r.jsx("span",{children:new Date(n.metadata.createdAt).toLocaleDateString()})]}),r.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[r.jsx(ty,{className:"h-4 w-4 text-muted-foreground"}),r.jsx("span",{className:"font-medium",children:"Updated:"}),r.jsx("span",{children:new Date(n.metadata.updatedAt).toLocaleDateString()})]}),r.jsx(or,{}),r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-sm",children:"Status:"}),r.jsx("div",{className:"mt-1",children:r.jsx(ut,{variant:fR(n.status),children:n.status})})]}),n.metadata.priority&&r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-sm",children:"Priority:"}),r.jsx("div",{className:"mt-1",children:r.jsx(ut,{variant:pR(n.metadata.priority),children:n.metadata.priority})})]}),n.metadata.tags&&n.metadata.tags.length>0&&r.jsxs("div",{children:[r.jsx("span",{className:"font-medium text-sm",children:"Tags:"}),r.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:n.metadata.tags.map(B=>r.jsx(ut,{variant:"outline",className:"text-xs",children:B},B))})]})]})]})]})]})]})}function Ht(){return Ht=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Ht.apply(null,arguments)}function Nd(e,t){if(e==null)return{};var n={};for(var s in e)if({}.hasOwnProperty.call(e,s)){if(t.indexOf(s)!==-1)continue;n[s]=e[s]}return n}function sa(e){return"children"in e?k6(e):"value"in e?e.value:""}function ene(e){return e.type==="text"?e.value:"children"in e?k6(e):""}function k6(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=ene(e.children[t]);return n.join("")}const tne={}.hasOwnProperty;function R6(e,t,n){const s=Gd(t),a=t&&typeof t=="object"&&"cascade"in t?t.cascade:void 0,o=a??!0;return u(e);function u(c,d,h){const p=[];if(!s(c,d,h))return;if(nne(c)){let v=-1;for(;++v<c.children.length;){const C=u(c.children[v],v,c);C&&p.push(C)}if(o&&c.children.length>0&&p.length===0)return}const m={};let g;for(g in c)tne.call(c,g)&&(m[g]=g==="children"?p:c[g]);return m}}function nne(e){return"children"in e&&e.children!==void 0}var Pf={exports:{}},mR;function rne(){return mR||(mR=1,(function(e,t){function n(s){let a=[],o;for(let u of s.split(",").map(c=>c.trim()))if(/^-?\d+$/.test(u))a.push(parseInt(u,10));else if(o=u.match(/^(-?\d+)(-|\.\.\.?|\u2025|\u2026|\u22EF)(-?\d+)$/)){let[c,d,h,p]=o;if(d&&p){d=parseInt(d),p=parseInt(p);const m=d<p?1:-1;(h==="-"||h===".."||h==="‥")&&(p+=m);for(let g=d;g!==p;g+=m)a.push(g)}}return a}t.default=n,e.exports=n})(Pf,Pf.exports)),Pf.exports}var sne=rne();const D6=ac(sne);zt.displayName="clike";zt.aliases=[];function zt(e){e.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}}zs.displayName="c";zs.aliases=[];function zs(e){e.register(zt),e.languages.c=e.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),e.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),e.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},e.languages.c.string],char:e.languages.c.char,comment:e.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:e.languages.c}}}}),e.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete e.languages.c.boolean}Io.displayName="cpp";Io.aliases=[];function Io(e){e.register(zs),(function(t){var n=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,s=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return n.source});t.languages.cpp=t.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return n.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:n,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),t.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return s})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),t.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t.languages.cpp}}}}),t.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),t.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:t.languages.extend("cpp",{})}}),t.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},t.languages.cpp["base-clause"])})(e)}Pm.displayName="arduino";Pm.aliases=["ino"];function Pm(e){e.register(Io),e.languages.arduino=e.languages.extend("cpp",{keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),e.languages.ino=e.languages.arduino}Zd.displayName="bash";Zd.aliases=["sh","shell"];function Zd(e){(function(t){var n="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",s={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:s,environment:{pattern:RegExp("\\$"+n),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+n),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};t.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+n),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:s}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+n),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},s.inside=t.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],u=a.variable[1].inside,c=0;c<o.length;c++)u[o[c]]=t.languages.bash[o[c]];t.languages.sh=t.languages.bash,t.languages.shell=t.languages.bash})(e)}jo.displayName="csharp";jo.aliases=["cs","dotnet"];function jo(e){e.register(zt),(function(t){function n(O,V){return O.replace(/<<(\d+)>>/g,function(te,U){return"(?:"+V[+U]+")"})}function s(O,V,te){return RegExp(n(O,V),"")}function a(O,V){for(var te=0;te<V;te++)O=O.replace(/<<self>>/g,function(){return"(?:"+O+")"});return O.replace(/<<self>>/g,"[^\\s\\S]")}var o={type:"bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",typeDeclaration:"class enum interface record struct",contextual:"add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",other:"abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield"};function u(O){return"\\b(?:"+O.trim().replace(/ /g,"|")+")\\b"}var c=u(o.typeDeclaration),d=RegExp(u(o.type+" "+o.typeDeclaration+" "+o.contextual+" "+o.other)),h=u(o.typeDeclaration+" "+o.contextual+" "+o.other),p=u(o.type+" "+o.typeDeclaration+" "+o.other),m=a(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),g=a(/\((?:[^()]|<<self>>)*\)/.source,2),v=/@?\b[A-Za-z_]\w*\b/.source,C=n(/<<0>>(?:\s*<<1>>)?/.source,[v,m]),S=n(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[h,C]),b=/\[\s*(?:,\s*)*\]/.source,y=n(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[S,b]),E=n(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[m,g,b]),_=n(/\(<<0>>+(?:,<<0>>+)+\)/.source,[E]),N=n(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[_,S,b]),A={keyword:d,punctuation:/[<>()?,.:[\]]/},k=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,I=/"(?:\\.|[^\\"\r\n])*"/.source,R=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;t.languages.csharp=t.languages.extend("clike",{string:[{pattern:s(/(^|[^$\\])<<0>>/.source,[R]),lookbehind:!0,greedy:!0},{pattern:s(/(^|[^@$\\])<<0>>/.source,[I]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:s(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[S]),lookbehind:!0,inside:A},{pattern:s(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[v,N]),lookbehind:!0,inside:A},{pattern:s(/(\busing\s+)<<0>>(?=\s*=)/.source,[v]),lookbehind:!0},{pattern:s(/(\b<<0>>\s+)<<1>>/.source,[c,C]),lookbehind:!0,inside:A},{pattern:s(/(\bcatch\s*\(\s*)<<0>>/.source,[S]),lookbehind:!0,inside:A},{pattern:s(/(\bwhere\s+)<<0>>/.source,[v]),lookbehind:!0},{pattern:s(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[y]),lookbehind:!0,inside:A},{pattern:s(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[N,p,v]),inside:A}],keyword:d,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),t.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),t.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:s(/([(,]\s*)<<0>>(?=\s*:)/.source,[v]),lookbehind:!0,alias:"punctuation"}}),t.languages.insertBefore("csharp","class-name",{namespace:{pattern:s(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[v]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:s(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[g]),lookbehind:!0,alias:"class-name",inside:A},"return-type":{pattern:s(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[N,S]),inside:A,alias:"class-name"},"constructor-invocation":{pattern:s(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[N]),lookbehind:!0,inside:A,alias:"class-name"},"generic-method":{pattern:s(/<<0>>\s*<<1>>(?=\s*\()/.source,[v,m]),inside:{function:s(/^<<0>>/.source,[v]),generic:{pattern:RegExp(m),alias:"class-name",inside:A}}},"type-list":{pattern:s(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,C,v,N,d.source,g,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:s(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[C,g]),lookbehind:!0,greedy:!0,inside:t.languages.csharp},keyword:d,"class-name":{pattern:RegExp(N),greedy:!0,inside:A},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var M=I+"|"+k,L=n(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),$=a(n(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[L]),2),H=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,B=n(/<<0>>(?:\s*\(<<1>>*\))?/.source,[S,$]);t.languages.insertBefore("csharp","class-name",{attribute:{pattern:s(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[H,B]),lookbehind:!0,greedy:!0,inside:{target:{pattern:s(/^<<0>>(?=\s*:)/.source,[H]),alias:"keyword"},"attribute-arguments":{pattern:s(/\(<<0>>*\)/.source,[$]),inside:t.languages.csharp},"class-name":{pattern:RegExp(S),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var z=/:[^}\r\n]+/.source,Q=a(n(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[L]),2),P=n(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,z]),X=a(n(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[M]),2),Y=n(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[X,z]);function F(O,V){return{interpolation:{pattern:s(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[O]),lookbehind:!0,inside:{"format-string":{pattern:s(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[V,z]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:t.languages.csharp}}},string:/[\s\S]+/}}t.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:s(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[P]),lookbehind:!0,greedy:!0,inside:F(P,Q)},{pattern:s(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[Y]),lookbehind:!0,greedy:!0,inside:F(Y,X)}],char:{pattern:RegExp(k),greedy:!0}}),t.languages.dotnet=t.languages.cs=t.languages.csharp})(e)}ur.displayName="markup";ur.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function ur(e){e.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},e.languages.markup.tag.inside["attr-value"].inside.entity=e.languages.markup.entity,e.languages.markup.doctype.inside["internal-subset"].inside=e.languages.markup,e.hooks.add("wrap",function(t){t.type==="entity"&&(t.attributes.title=t.content.value.replace(/&/,"&"))}),Object.defineProperty(e.languages.markup.tag,"addInlined",{value:function(n,s){var a={};a["language-"+s]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:e.languages[s]},a.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:a}};o["language-"+s]={pattern:/[\s\S]+/,inside:e.languages[s]};var u={};u[n]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return n}),"i"),lookbehind:!0,greedy:!0,inside:o},e.languages.insertBefore("markup","cdata",u)}}),Object.defineProperty(e.languages.markup.tag,"addAttribute",{value:function(t,n){e.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+t+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:e.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),e.languages.html=e.languages.markup,e.languages.mathml=e.languages.markup,e.languages.svg=e.languages.markup,e.languages.xml=e.languages.extend("markup",{}),e.languages.ssml=e.languages.xml,e.languages.atom=e.languages.xml,e.languages.rss=e.languages.xml}qi.displayName="css";qi.aliases=[];function qi(e){(function(t){var n=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;t.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+n.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+n.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+n.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+n.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:n,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},t.languages.css.atrule.inside.rest=t.languages.css;var s=t.languages.markup;s&&(s.tag.addInlined("style","css"),s.tag.addAttribute("style","css"))})(e)}Bm.displayName="diff";Bm.aliases=[];function Bm(e){(function(t){t.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var n={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(n).forEach(function(s){var a=n[s],o=[];/^\w+$/.test(s)||o.push(/\w+/.exec(s)[0]),s==="diff"&&o.push("bold"),t.languages.diff[s]={pattern:RegExp("^(?:["+a+`].*(?:\r
|
|
760
760
|
?|
|
|
761
761
|
|(?![\\s\\S])))+`,"m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(s)[0]}}}}),Object.defineProperty(t.languages.diff,"PREFIXES",{value:n})})(e)}Um.displayName="go";Um.aliases=[];function Um(e){e.register(zt),e.languages.go=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),e.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete e.languages.go["class-name"]}Hm.displayName="ini";Hm.aliases=[];function Hm(e){e.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}}Oo.displayName="java";Oo.aliases=[];function Oo(e){e.register(zt),(function(t){var n=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,s=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,a={pattern:RegExp(/(^|[^\w.])/.source+s+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};t.languages.java=t.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[a,{pattern:RegExp(/(^|[^\w.])/.source+s+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:a.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+s+/[A-Z]\w*\b/.source),lookbehind:!0,inside:a.inside}],keyword:n,function:[t.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),t.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),t.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":a,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+s+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:a.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+s+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:a.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return n.source})),lookbehind:!0,inside:{punctuation:/\./}}})})(e)}$m.displayName="regex";$m.aliases=[];function $m(e){(function(t){var n={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},s=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,a={pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},o={pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},u="(?:[^\\\\-]|"+s.source+")",c=RegExp(u+"-"+u),d={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};t.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:c,inside:{escape:s,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":n,"char-set":o,escape:s}},"special-escape":n,"char-set":a,backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":d}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:s,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":d}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}})(e)}yr.displayName="javascript";yr.aliases=["js"];function yr(e){e.register(zt),e.languages.javascript=e.languages.extend("clike",{"class-name":[e.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),e.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,e.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:e.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:e.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:e.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:e.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),e.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:e.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),e.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),e.languages.markup&&(e.languages.markup.tag.addInlined("script","javascript"),e.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),e.languages.js=e.languages.javascript}Nc.displayName="json";Nc.aliases=["webmanifest"];function Nc(e){e.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},e.languages.webmanifest=e.languages.json}zm.displayName="kotlin";zm.aliases=["kt","kts"];function zm(e){e.register(zt),(function(t){t.languages.kotlin=t.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete t.languages.kotlin["class-name"];var n={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:t.languages.kotlin}};t.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:n},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:n},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete t.languages.kotlin.string,t.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),t.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),t.languages.kt=t.languages.kotlin,t.languages.kts=t.languages.kotlin})(e)}Gm.displayName="less";Gm.aliases=[];function Gm(e){e.register(qi),e.languages.less=e.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),e.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}})}Qd.displayName="lua";Qd.aliases=[];function Qd(e){e.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}}qm.displayName="makefile";qm.aliases=[];function qm(e){e.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}}Jd.displayName="yaml";Jd.aliases=["yml"];function Jd(e){(function(t){var n=/[*&][^\s[\]{},]+/,s=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,a="(?:"+s.source+"(?:[ ]+"+n.source+")?|"+n.source+"(?:[ ]+"+s.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),u=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function c(d,h){h=(h||"").replace(/m/g,"")+"m";var p=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return a}).replace(/<<value>>/g,function(){return d});return RegExp(p,h)}t.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return a})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return a}).replace(/<<key>>/g,function(){return"(?:"+o+"|"+u+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:c(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:c(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:c(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:c(u),lookbehind:!0,greedy:!0},number:{pattern:c(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:s,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},t.languages.yml=t.languages.yaml})(e)}Wm.displayName="markdown";Wm.aliases=["md"];function Wm(e){e.register(ur),(function(t){var n=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function s(c){return c=c.replace(/<inner>/g,function(){return n}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var a=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return a}),u=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;t.languages.markdown=t.languages.extend("markup",{}),t.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:t.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+u+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+u+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(a),inside:t.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+u+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(a),alias:"important",inside:t.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:s(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:s(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:s(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:s(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(d){c!==d&&(t.languages.markdown[c].inside.content.inside[d]=t.languages.markdown[d])})}),t.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function d(h){if(!(!h||typeof h=="string"))for(var p=0,m=h.length;p<m;p++){var g=h[p];if(g.type!=="code"){d(g.content);continue}var v=g.content[1],C=g.content[3];if(v&&C&&v.type==="code-language"&&C.type==="code-block"&&typeof v.content=="string"){var S=v.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");S=(/[a-z][\w-]*/i.exec(S)||[""])[0].toLowerCase();var b="language-"+S;C.alias?typeof C.alias=="string"?C.alias=[C.alias,b]:C.alias.push(b):C.alias=[b]}}}d(c.tokens)}),t.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var d="",h=0,p=c.classes.length;h<p;h++){var m=c.classes[h],g=/language-(.+)/.exec(m);if(g){d=g[1];break}}var v=t.languages[d];if(v)c.content=t.highlight(c.content.value,v,d);else if(d&&d!=="none"&&t.plugins.autoloader){var C="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=C,t.plugins.autoloader.loadLanguages(d,function(){var S=document.getElementById(C);S&&(S.innerHTML=t.highlight(S.textContent,t.languages[d],d))})}}}),RegExp(t.languages.markup.tag.pattern.source,"gi"),t.languages.md=t.languages.markdown})(e)}Vm.displayName="objectivec";Vm.aliases=["objc"];function Vm(e){e.register(zs),e.languages.objectivec=e.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}Ym.displayName="perl";Ym.aliases=[];function Ym(e){(function(t){var n=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;t.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,n].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,n].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,n+/\s*/.source+n].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}})(e)}Er.displayName="markup-templating";Er.aliases=[];function Er(e){e.register(ur),(function(t){function n(s,a){return"___"+s.toUpperCase()+a+"___"}Object.defineProperties(t.languages["markup-templating"]={},{buildPlaceholders:{value:function(s,a,o,u){if(s.language===a){var c=s.tokenStack=[];s.code=s.code.replace(o,function(d){if(typeof u=="function"&&!u(d))return d;for(var h=c.length,p;s.code.indexOf(p=n(a,h))!==-1;)++h;return c[h]=d,p}),s.grammar=t.languages.markup}}},tokenizePlaceholders:{value:function(s,a){if(s.language!==a||!s.tokenStack)return;s.grammar=t.languages[a];var o=0,u=Object.keys(s.tokenStack);function c(d){for(var h=0;h<d.length&&!(o>=u.length);h++){var p=d[h];if(typeof p=="string"||p.content&&typeof p.content=="string"){var m=u[o],g=s.tokenStack[m],v=typeof p=="string"?p:p.content,C=n(a,m),S=v.indexOf(C);if(S>-1){++o;var b=v.substring(0,S),y=new t.Token(a,t.tokenize(g,s.grammar),"language-"+a,g),E=v.substring(S+C.length),_=[];b&&_.push.apply(_,c([b])),_.push(y),E&&_.push.apply(_,c([E])),typeof p=="string"?d.splice.apply(d,[h,1].concat(_)):p.content=_}}else p.content&&c(p.content)}return d}c(s.tokens)}}})})(e)}Lo.displayName="php";Lo.aliases=[];function Lo(e){e.register(Er),(function(t){var n=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,s=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],a=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,u=/[{}\[\](),:;]/;t.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:n,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:s,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:a,operator:o,punctuation:u};var c={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:t.languages.php},d=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:c}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:c}}];t.languages.insertBefore("php","variable",{string:d,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:n,string:d,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:s,number:a,operator:o,punctuation:u}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),t.hooks.add("before-tokenize",function(h){if(/<\?/.test(h.code)){var p=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;t.languages["markup-templating"].buildPlaceholders(h,"php",p)}}),t.hooks.add("after-tokenize",function(h){t.languages["markup-templating"].tokenizePlaceholders(h,"php")})})(e)}eh.displayName="python";eh.aliases=["py"];function eh(e){e.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},e.languages.python["string-interpolation"].inside.interpolation.inside.rest=e.languages.python,e.languages.py=e.languages.python}Km.displayName="r";Km.aliases=[];function Km(e){e.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}}Mo.displayName="ruby";Mo.aliases=["rb"];function Mo(e){e.register(zt),(function(t){t.languages.ruby=t.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),t.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var n={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:t.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete t.languages.ruby.function;var s="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",a=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;t.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+s+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+a),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+a+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),t.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+s),greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:n,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+s),greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:n,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete t.languages.ruby.string,t.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),t.languages.rb=t.languages.ruby})(e)}Xm.displayName="rust";Xm.aliases=[];function Xm(e){(function(t){for(var n=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,s=0;s<2;s++)n=n.replace(/<self>/g,function(){return n});n=n.replace(/<self>/g,function(){return/[^\s\S]/.source}),t.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+n),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},t.languages.rust["closure-params"].inside.rest=t.languages.rust,t.languages.rust.attribute.inside.string=t.languages.rust.string})(e)}Zm.displayName="sass";Zm.aliases=[];function Zm(e){e.register(qi),(function(t){t.languages.sass=t.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),t.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete t.languages.sass.atrule;var n=/\$[-\w]+|#\{\$[-\w]+\}/,s=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];t.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:n,operator:s}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:n,operator:s,important:t.languages.sass.important}}}),delete t.languages.sass.property,delete t.languages.sass.important,t.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})})(e)}Qm.displayName="scss";Qm.aliases=[];function Qm(e){e.register(qi),e.languages.scss=e.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),e.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),e.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),e.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),e.languages.scss.atrule.inside.rest=e.languages.scss}Tc.displayName="sql";Tc.aliases=[];function Tc(e){e.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}}Jm.displayName="swift";Jm.aliases=[];function Jm(e){e.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},e.languages.swift["string-literal"].forEach(function(t){t.inside.interpolation.inside=e.languages.swift})}Ac.displayName="typescript";Ac.aliases=["ts"];function Ac(e){e.register(yr),(function(t){t.languages.typescript=t.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),t.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete t.languages.typescript.parameter,delete t.languages.typescript["literal-property"];var n=t.languages.extend("typescript",{});delete n["class-name"],t.languages.typescript["class-name"].inside=n,t.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),t.languages.ts=t.languages.typescript})(e)}th.displayName="basic";th.aliases=[];function th(e){e.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}}nh.displayName="vbnet";nh.aliases=[];function nh(e){e.register(th),e.languages.vbnet=e.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}class rh{constructor(t,n,s){this.property=t,this.normal=n,s&&(this.space=s)}}rh.prototype.property={};rh.prototype.normal={};rh.prototype.space=null;function I6(e,t){const n={},s={};let a=-1;for(;++a<e.length;)Object.assign(n,e[a].property),Object.assign(s,e[a].normal);return new rh(n,s,t)}function Td(e){return e.toLowerCase()}class ks{constructor(t,n){this.property=t,this.attribute=n}}ks.prototype.space=null;ks.prototype.boolean=!1;ks.prototype.booleanish=!1;ks.prototype.overloadedBoolean=!1;ks.prototype.number=!1;ks.prototype.commaSeparated=!1;ks.prototype.spaceSeparated=!1;ks.prototype.commaOrSpaceSeparated=!1;ks.prototype.mustUseProperty=!1;ks.prototype.defined=!1;let ane=0;const kt=Fo(),qn=Fo(),j6=Fo(),We=Fo(),yn=Fo(),ql=Fo(),is=Fo();function Fo(){return 2**++ane}const _v=Object.freeze(Object.defineProperty({__proto__:null,boolean:kt,booleanish:qn,commaOrSpaceSeparated:is,commaSeparated:ql,number:We,overloadedBoolean:j6,spaceSeparated:yn},Symbol.toStringTag,{value:"Module"})),o0=Object.keys(_v);class fE extends ks{constructor(t,n,s,a){let o=-1;if(super(t,n),gR(this,"space",a),typeof s=="number")for(;++o<o0.length;){const u=o0[o];gR(this,o0[o],(s&_v[u])===_v[u])}}}fE.prototype.defined=!0;function gR(e,t,n){n&&(e[t]=n)}const ine={}.hasOwnProperty;function kc(e){const t={},n={};let s;for(s in e.properties)if(ine.call(e.properties,s)){const a=e.properties[s],o=new fE(s,e.transform(e.attributes||{},s),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(s)&&(o.mustUseProperty=!0),t[s]=o,n[Td(s)]=s,n[Td(o.attribute)]=s}return new rh(t,n,e.space)}const O6=kc({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),L6=kc({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function M6(e,t){return t in e?e[t]:t}function F6(e,t){return M6(e,t.toLowerCase())}const P6=kc({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:F6,properties:{xmlns:null,xmlnsXLink:null}}),B6=kc({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:qn,ariaAutoComplete:null,ariaBusy:qn,ariaChecked:qn,ariaColCount:We,ariaColIndex:We,ariaColSpan:We,ariaControls:yn,ariaCurrent:null,ariaDescribedBy:yn,ariaDetails:null,ariaDisabled:qn,ariaDropEffect:yn,ariaErrorMessage:null,ariaExpanded:qn,ariaFlowTo:yn,ariaGrabbed:qn,ariaHasPopup:null,ariaHidden:qn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yn,ariaLevel:We,ariaLive:null,ariaModal:qn,ariaMultiLine:qn,ariaMultiSelectable:qn,ariaOrientation:null,ariaOwns:yn,ariaPlaceholder:null,ariaPosInSet:We,ariaPressed:qn,ariaReadOnly:qn,ariaRelevant:null,ariaRequired:qn,ariaRoleDescription:yn,ariaRowCount:We,ariaRowIndex:We,ariaRowSpan:We,ariaSelected:qn,ariaSetSize:We,ariaSort:null,ariaValueMax:We,ariaValueMin:We,ariaValueNow:We,ariaValueText:null,role:null}}),one=kc({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:F6,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ql,acceptCharset:yn,accessKey:yn,action:null,allow:null,allowFullScreen:kt,allowPaymentRequest:kt,allowUserMedia:kt,alt:null,as:null,async:kt,autoCapitalize:null,autoComplete:yn,autoFocus:kt,autoPlay:kt,blocking:yn,capture:null,charSet:null,checked:kt,cite:null,className:yn,cols:We,colSpan:null,content:null,contentEditable:qn,controls:kt,controlsList:yn,coords:We|ql,crossOrigin:null,data:null,dateTime:null,decoding:null,default:kt,defer:kt,dir:null,dirName:null,disabled:kt,download:j6,draggable:qn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:kt,formTarget:null,headers:yn,height:We,hidden:kt,high:We,href:null,hrefLang:null,htmlFor:yn,httpEquiv:yn,id:null,imageSizes:null,imageSrcSet:null,inert:kt,inputMode:null,integrity:null,is:null,isMap:kt,itemId:null,itemProp:yn,itemRef:yn,itemScope:kt,itemType:yn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:kt,low:We,manifest:null,max:null,maxLength:We,media:null,method:null,min:null,minLength:We,multiple:kt,muted:kt,name:null,nonce:null,noModule:kt,noValidate:kt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:kt,optimum:We,pattern:null,ping:yn,placeholder:null,playsInline:kt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:kt,referrerPolicy:null,rel:yn,required:kt,reversed:kt,rows:We,rowSpan:We,sandbox:yn,scope:null,scoped:kt,seamless:kt,selected:kt,shadowRootClonable:kt,shadowRootDelegatesFocus:kt,shadowRootMode:null,shape:null,size:We,sizes:null,slot:null,span:We,spellCheck:qn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:We,step:null,style:null,tabIndex:We,target:null,title:null,translate:null,type:null,typeMustMatch:kt,useMap:null,value:qn,width:We,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yn,axis:null,background:null,bgColor:null,border:We,borderColor:null,bottomMargin:We,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:kt,declare:kt,event:null,face:null,frame:null,frameBorder:null,hSpace:We,leftMargin:We,link:null,longDesc:null,lowSrc:null,marginHeight:We,marginWidth:We,noResize:kt,noHref:kt,noShade:kt,noWrap:kt,object:null,profile:null,prompt:null,rev:null,rightMargin:We,rules:null,scheme:null,scrolling:qn,standby:null,summary:null,text:null,topMargin:We,valueType:null,version:null,vAlign:null,vLink:null,vSpace:We,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:kt,disableRemotePlayback:kt,prefix:null,property:null,results:We,security:null,unselectable:null}}),lne=kc({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:M6,properties:{about:is,accentHeight:We,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:We,amplitude:We,arabicForm:null,ascent:We,attributeName:null,attributeType:null,azimuth:We,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:We,by:null,calcMode:null,capHeight:We,className:yn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:We,diffuseConstant:We,direction:null,display:null,dur:null,divisor:We,dominantBaseline:null,download:kt,dx:null,dy:null,edgeMode:null,editable:null,elevation:We,enableBackground:null,end:null,event:null,exponent:We,externalResourcesRequired:null,fill:null,fillOpacity:We,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ql,g2:ql,glyphName:ql,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:We,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:We,horizOriginX:We,horizOriginY:We,id:null,ideographic:We,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:We,k:We,k1:We,k2:We,k3:We,k4:We,kernelMatrix:is,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:We,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:We,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:We,overlineThickness:We,paintOrder:null,panose1:null,path:null,pathLength:We,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:We,pointsAtY:We,pointsAtZ:We,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:is,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:is,rev:is,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:is,requiredFeatures:is,requiredFonts:is,requiredFormats:is,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:We,specularExponent:We,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:We,strikethroughThickness:We,string:null,stroke:null,strokeDashArray:is,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:We,strokeOpacity:We,strokeWidth:null,style:null,surfaceScale:We,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:is,tabIndex:We,tableValues:null,target:null,targetX:We,targetY:We,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:is,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:We,underlineThickness:We,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:We,values:null,vAlphabetic:We,vMathematical:We,vectorEffect:null,vHanging:We,vIdeographic:We,version:null,vertAdvY:We,vertOriginX:We,vertOriginY:We,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:We,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),cne=/^data[-\w.:]+$/i,bR=/-[a-z]/g,une=/[A-Z]/g;function U6(e,t){const n=Td(t);let s=t,a=ks;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&cne.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(bR,hne);s="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!bR.test(o)){let u=o.replace(une,dne);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}a=fE}return new a(s,t)}function dne(e){return"-"+e.toLowerCase()}function hne(e){return e.charAt(1).toUpperCase()}const H6=I6([L6,O6,P6,B6,one],"html"),$6=I6([L6,O6,P6,B6,lne],"svg"),xR=/[#.]/g;function fne(e,t){const n=e||"",s={};let a=0,o,u;for(;a<n.length;){xR.lastIndex=a;const c=xR.exec(n),d=n.slice(a,c?c.index:n.length);d&&(o?o==="#"?s.id=d:Array.isArray(s.className)?s.className.push(d):s.className=[d]:u=d,a+=d.length),c&&(o=c[0],a++)}return{type:"element",tagName:u||t||"div",properties:s,children:[]}}const pne=new Set(["menu","submit","reset","button"]),z6={}.hasOwnProperty;function mne(e,t,n){return(function(a,o,...u){let c=-1,d;if(a==null)d={type:"root",children:[]},u.unshift(o);else if(d=fne(a,t),d.tagName=d.tagName.toLowerCase(),gne(o,d.tagName)){let h;for(h in o)z6.call(o,h)&&bne(e,d.properties,h,o[h])}else u.unshift(o);for(;++c<u.length;)wv(d.children,u[c]);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d})}function gne(e,t){return e==null||typeof e!="object"||Array.isArray(e)?!1:t==="input"||!e.type||typeof e.type!="string"?!0:"children"in e&&Array.isArray(e.children)?!1:t==="button"?pne.has(e.type.toLowerCase()):!("value"in e)}function bne(e,t,n,s){const a=U6(e,n);let o=-1,u;if(s!=null){if(typeof s=="number"){if(Number.isNaN(s))return;u=s}else typeof s=="boolean"?u=s:typeof s=="string"?a.spaceSeparated?u=vd(s):a.commaSeparated?u=bd(s):a.commaOrSpaceSeparated?u=vd(bd(s).join(" ")):u=vR(a,a.property,s):Array.isArray(s)?u=s.concat():u=a.property==="style"?xne(s):String(s);if(Array.isArray(u)){const c=[];for(;++o<u.length;)c[o]=vR(a,a.property,u[o]);u=c}a.property==="className"&&Array.isArray(t.className)&&(u=t.className.concat(u)),t[a.property]=u}}function wv(e,t){let n=-1;if(t!=null)if(typeof t=="string"||typeof t=="number")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(;++n<t.length;)wv(e,t[n]);else if(typeof t=="object"&&"type"in t)t.type==="root"?wv(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function vR(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Td(n)===Td(t)))return!0}return n}function xne(e){const t=[];let n;for(n in e)z6.call(e,n)&&t.push([n,e[n]].join(": "));return t.join("; ")}const vne=mne(H6,"div"),G6=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],yR={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};function q6(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=48&&t<=57}function yne(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=102||t>=65&&t<=70||t>=48&&t<=57}function Ene(e){const t=typeof e=="string"?e.charCodeAt(0):e;return t>=97&&t<=122||t>=65&&t<=90}function ER(e){return Ene(e)||q6(e)}const Sne=["","Named character references must be terminated by a semicolon","Numeric character references must be terminated by a semicolon","Named character references cannot be empty","Numeric character references cannot be empty","Named character references must be known","Numeric character references cannot be disallowed","Numeric character references cannot be outside the permissible Unicode range"];function _ne(e,t){const n={},s=typeof n.additional=="string"?n.additional.charCodeAt(0):n.additional,a=[];let o=0,u=-1,c="",d,h;n.position&&("start"in n.position||"indent"in n.position?(h=n.position.indent,d=n.position.start):d=n.position);let p=(d?d.line:0)||1,m=(d?d.column:0)||1,g=C(),v;for(o--;++o<=e.length;)if(v===10&&(m=(h?h[u]:0)||1),v=e.charCodeAt(o),v===38){const y=e.charCodeAt(o+1);if(y===9||y===10||y===12||y===32||y===38||y===60||Number.isNaN(y)||s&&y===s){c+=String.fromCharCode(v),m++;continue}const E=o+1;let _=E,N=E,A;if(y===35){N=++_;const B=e.charCodeAt(N);B===88||B===120?(A="hexadecimal",N=++_):A="decimal"}else A="named";let k="",I="",R="";const M=A==="named"?ER:A==="decimal"?q6:yne;for(N--;++N<=e.length;){const B=e.charCodeAt(N);if(!M(B))break;R+=String.fromCharCode(B),A==="named"&&G6.includes(R)&&(k=R,I=Ed(R))}let L=e.charCodeAt(N)===59;if(L){N++;const B=A==="named"?Ed(R):!1;B&&(k=R,I=B)}let $=1+N-E,H="";if(!(!L&&n.nonTerminated===!1))if(!R)A!=="named"&&S(4,$);else if(A==="named"){if(L&&!I)S(5,1);else if(k!==R&&(N=_+k.length,$=1+N-_,L=!1),!L){const B=k?1:3;if(n.attribute){const z=e.charCodeAt(N);z===61?(S(B,$),I=""):ER(z)?I="":S(B,$)}else S(B,$)}H=I}else{L||S(2,$);let B=Number.parseInt(R,A==="hexadecimal"?16:10);if(wne(B))S(7,$),H="�";else if(B in yR)S(6,$),H=yR[B];else{let z="";Cne(B)&&S(6,$),B>65535&&(B-=65536,z+=String.fromCharCode(B>>>10|55296),B=56320|B&1023),H=z+String.fromCharCode(B)}}if(H){b(),g=C(),o=N-1,m+=N-E+1,a.push(H);const B=C();B.offset++,n.reference&&n.reference.call(n.referenceContext||void 0,H,{start:g,end:B},e.slice(E-1,N)),g=B}else R=e.slice(E-1,N),c+=R,m+=R.length,o=N-1}else v===10&&(p++,u++,m=0),Number.isNaN(v)?b():(c+=String.fromCharCode(v),m++);return a.join("");function C(){return{line:p,column:m,offset:o+((d?d.offset:0)||0)}}function S(y,E){let _;n.warning&&(_=C(),_.column+=E,_.offset+=E,n.warning.call(n.warningContext||void 0,Sne[y],_,y))}function b(){c&&(a.push(c),n.text&&n.text.call(n.textContext||void 0,c,{start:g,end:C()}),c="")}}function wne(e){return e>=55296&&e<=57343||e>1114111}function Cne(e){return e>=1&&e<=8||e===11||e>=13&&e<=31||e>=127&&e<=159||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534}var Nne=0,Bf={},rr={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++Nne}),e.__id},clone:function e(t,n){n=n||{};var s,a;switch(rr.util.type(t)){case"Object":if(a=rr.util.objId(t),n[a])return n[a];s={},n[a]=s;for(var o in t)t.hasOwnProperty(o)&&(s[o]=e(t[o],n));return s;case"Array":return a=rr.util.objId(t),n[a]?n[a]:(s=[],n[a]=s,t.forEach(function(u,c){s[c]=e(u,n)}),s);default:return t}}},languages:{plain:Bf,plaintext:Bf,text:Bf,txt:Bf,extend:function(e,t){var n=rr.util.clone(rr.languages[e]);for(var s in t)n[s]=t[s];return n},insertBefore:function(e,t,n,s){s=s||rr.languages;var a=s[e],o={};for(var u in a)if(a.hasOwnProperty(u)){if(u==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(u)||(o[u]=a[u])}var d=s[e];return s[e]=o,rr.languages.DFS(rr.languages,function(h,p){p===d&&h!=e&&(this[h]=o)}),o},DFS:function e(t,n,s,a){a=a||{};var o=rr.util.objId;for(var u in t)if(t.hasOwnProperty(u)){n.call(t,u,t[u],s||u);var c=t[u],d=rr.util.type(c);d==="Object"&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):d==="Array"&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,u,a))}}},plugins:{},highlight:function(e,t,n){var s={code:e,grammar:t,language:n};if(rr.hooks.run("before-tokenize",s),!s.grammar)throw new Error('The language "'+s.language+'" has no grammar.');return s.tokens=rr.tokenize(s.code,s.grammar),rr.hooks.run("after-tokenize",s),ed.stringify(rr.util.encode(s.tokens),s.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var s in n)t[s]=n[s];delete t.rest}var a=new Tne;return lp(a,a.head,e),W6(e,a,t,a.head,0),kne(a)},hooks:{all:{},add:function(e,t){var n=rr.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=rr.hooks.all[e];if(!(!n||!n.length))for(var s=0,a;a=n[s++];)a(t)}},Token:ed};function ed(e,t,n,s){this.type=e,this.content=t,this.alias=n,this.length=(s||"").length|0}function SR(e,t,n,s){e.lastIndex=t;var a=e.exec(n);if(a&&s&&a[1]){var o=a[1].length;a.index+=o,a[0]=a[0].slice(o)}return a}function W6(e,t,n,s,a,o){for(var u in n)if(!(!n.hasOwnProperty(u)||!n[u])){var c=n[u];c=Array.isArray(c)?c:[c];for(var d=0;d<c.length;++d){if(o&&o.cause==u+","+d)return;var h=c[d],p=h.inside,m=!!h.lookbehind,g=!!h.greedy,v=h.alias;if(g&&!h.pattern.global){var C=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,C+"g")}for(var S=h.pattern||h,b=s.next,y=a;b!==t.tail&&!(o&&y>=o.reach);y+=b.value.length,b=b.next){var E=b.value;if(t.length>e.length)return;if(!(E instanceof ed)){var _=1,N;if(g){if(N=SR(S,y,e,m),!N||N.index>=e.length)break;var R=N.index,A=N.index+N[0].length,k=y;for(k+=b.value.length;R>=k;)b=b.next,k+=b.value.length;if(k-=b.value.length,y=k,b.value instanceof ed)continue;for(var I=b;I!==t.tail&&(k<A||typeof I.value=="string");I=I.next)_++,k+=I.value.length;_--,E=e.slice(y,k),N.index-=y}else if(N=SR(S,0,E,m),!N)continue;var R=N.index,M=N[0],L=E.slice(0,R),$=E.slice(R+M.length),H=y+E.length;o&&H>o.reach&&(o.reach=H);var B=b.prev;L&&(B=lp(t,B,L),y+=L.length),Ane(t,B,_);var z=new ed(u,p?rr.tokenize(M,p):M,v,M);if(b=lp(t,B,z),$&&lp(t,b,$),_>1){var Q={cause:u+","+d,reach:H};W6(e,t,n,b.prev,y,Q),o&&Q.reach>o.reach&&(o.reach=Q.reach)}}}}}}function Tne(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function lp(e,t,n){var s=t.next,a={value:n,prev:t,next:s};return t.next=a,s.prev=a,e.length++,a}function Ane(e,t,n){for(var s=t.next,a=0;a<n&&s!==e.tail;a++)s=s.next;t.next=s,s.prev=t,e.length-=a}function kne(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}const V6=rr,Rc={}.hasOwnProperty;function Y6(){}Y6.prototype=V6;const J=new Y6;J.highlight=Rne;J.register=Dne;J.alias=Ine;J.registered=jne;J.listLanguages=One;J.util.encode=Lne;J.Token.stringify=Cv;function Rne(e,t){if(typeof e!="string")throw new TypeError("Expected `string` for `value`, got `"+e+"`");let n,s;if(t&&typeof t=="object")n=t;else{if(s=t,typeof s!="string")throw new TypeError("Expected `string` for `name`, got `"+s+"`");if(Rc.call(J.languages,s))n=J.languages[s];else throw new Error("Unknown language: `"+s+"` is not registered")}return{type:"root",children:V6.highlight.call(J,e,n,s)}}function Dne(e){if(typeof e!="function"||!e.displayName)throw new Error("Expected `function` for `syntax`, got `"+e+"`");Rc.call(J.languages,e.displayName)||e(J)}function Ine(e,t){const n=J.languages;let s={};typeof e=="string"?t&&(s[e]=t):s=e;let a;for(a in s)if(Rc.call(s,a)){const o=s[a],u=typeof o=="string"?[o]:o;let c=-1;for(;++c<u.length;)n[u[c]]=n[a]}}function jne(e){if(typeof e!="string")throw new TypeError("Expected `string` for `aliasOrLanguage`, got `"+e+"`");return Rc.call(J.languages,e)}function One(){const e=J.languages,t=[];let n;for(n in e)Rc.call(e,n)&&typeof e[n]=="object"&&t.push(n);return t}function Cv(e,t){if(typeof e=="string")return{type:"text",value:e};if(Array.isArray(e)){const s=[];let a=-1;for(;++a<e.length;)e[a]!==null&&e[a]!==void 0&&e[a]!==""&&s.push(Cv(e[a],t));return s}const n={attributes:{},classes:["token",e.type],content:Cv(e.content,t),language:t,tag:"span",type:e.type};return e.alias&&n.classes.push(...typeof e.alias=="string"?[e.alias]:e.alias),J.hooks.run("wrap",n),vne(n.tag+"."+n.classes.join("."),Mne(n.attributes),n.content)}function Lne(e){return e}function Mne(e){let t;for(t in e)Rc.call(e,t)&&(e[t]=_ne(e[t]));return e}J.register(zt);J.register(zs);J.register(Io);J.register(Pm);J.register(Zd);J.register(jo);J.register(ur);J.register(qi);J.register(Bm);J.register(Um);J.register(Hm);J.register(Oo);J.register($m);J.register(yr);J.register(Nc);J.register(zm);J.register(Gm);J.register(Qd);J.register(qm);J.register(Jd);J.register(Wm);J.register(Vm);J.register(Ym);J.register(Er);J.register(Lo);J.register(eh);J.register(Km);J.register(Mo);J.register(Xm);J.register(Zm);J.register(Qm);J.register(Tc);J.register(Jm);J.register(Ac);J.register(th);J.register(nh);pE.displayName="abap";pE.aliases=[];function pE(e){e.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}}mE.displayName="abnf";mE.aliases=[];function mE(e){(function(t){var n="(?:ALPHA|BIT|CHAR|CR|CRLF|CTL|DIGIT|DQUOTE|HEXDIG|HTAB|LF|LWSP|OCTET|SP|VCHAR|WSP)";t.languages.abnf={comment:/;.*/,string:{pattern:/(?:%[is])?"[^"\n\r]*"/,greedy:!0,inside:{punctuation:/^%[is]/}},range:{pattern:/%(?:b[01]+-[01]+|d\d+-\d+|x[A-F\d]+-[A-F\d]+)/i,alias:"number"},terminal:{pattern:/%(?:b[01]+(?:\.[01]+)*|d\d+(?:\.\d+)*|x[A-F\d]+(?:\.[A-F\d]+)*)/i,alias:"number"},repetition:{pattern:/(^|[^\w-])(?:\d*\*\d*|\d+)/,lookbehind:!0,alias:"operator"},definition:{pattern:/(^[ \t]*)(?:[a-z][\w-]*|<[^<>\r\n]*>)(?=\s*=)/m,lookbehind:!0,alias:"keyword",inside:{punctuation:/<|>/}},"core-rule":{pattern:RegExp("(?:(^|[^<\\w-])"+n+"|<"+n+">)(?![\\w-])","i"),lookbehind:!0,alias:["rule","constant"],inside:{punctuation:/<|>/}},rule:{pattern:/(^|[^<\w-])[a-z][\w-]*|<[^<>\r\n]*>/i,lookbehind:!0,inside:{punctuation:/<|>/}},operator:/=\/?|\//,punctuation:/[()\[\]]/}})(e)}gE.displayName="actionscript";gE.aliases=[];function gE(e){e.register(yr),e.languages.actionscript=e.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),e.languages.actionscript["class-name"].alias="function",delete e.languages.actionscript.parameter,delete e.languages.actionscript["literal-property"],e.languages.markup&&e.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:e.languages.markup}})}bE.displayName="ada";bE.aliases=[];function bE(e){e.languages.ada={comment:/--.*/,string:/"(?:""|[^"\r\f\n])*"/,number:[{pattern:/\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i},{pattern:/\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i}],attribute:{pattern:/\b'\w+/,alias:"attr-name"},keyword:/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|or|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,boolean:/\b(?:false|true)\b/i,operator:/<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,punctuation:/\.\.?|[,;():]/,char:/'.'/,variable:/\b[a-z](?:\w)*\b/i}}xE.displayName="agda";xE.aliases=[];function xE(e){(function(t){t.languages.agda={comment:/\{-[\s\S]*?(?:-\}|$)|--.*/,string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},punctuation:/[(){}⦃⦄.;@]/,"class-name":{pattern:/((?:data|record) +)\S+/,lookbehind:!0},function:{pattern:/(^[ \t]*)(?!\s)[^:\r\n]+(?=:)/m,lookbehind:!0},operator:{pattern:/(^\s*|\s)(?:[=|:∀→λ\\?_]|->)(?=\s)/,lookbehind:!0},keyword:/\b(?:Set|abstract|constructor|data|eta-equality|field|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/}})(e)}vE.displayName="al";vE.aliases=[];function vE(e){e.languages.al={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},function:{pattern:/(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,lookbehind:!0},keyword:[/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i,/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i],number:/\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|LL?|U(?:LL?)?)?\b/i,boolean:/\b(?:false|true)\b/i,variable:/\b(?:Curr(?:FieldNo|Page|Report)|x?Rec|RequestOptionsPage)\b/,"class-name":/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,operator:/\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,punctuation:/[()\[\]{}:.;,]/}}yE.displayName="antlr4";yE.aliases=["g4"];function yE(e){e.languages.antlr4={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,string:{pattern:/'(?:\\.|[^\\'\r\n])*'/,greedy:!0},"character-class":{pattern:/\[(?:\\.|[^\\\]\r\n])*\]/,greedy:!0,alias:"regex",inside:{range:{pattern:/([^[]|(?:^|[^\\])(?:\\\\)*\\\[)-(?!\])/,lookbehind:!0,alias:"punctuation"},escape:/\\(?:u(?:[a-fA-F\d]{4}|\{[a-fA-F\d]+\})|[pP]\{[=\w-]+\}|[^\r\nupP])/,punctuation:/[\[\]]/}},action:{pattern:/\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\}/,greedy:!0,inside:{content:{pattern:/(\{)[\s\S]+(?=\})/,lookbehind:!0},punctuation:/[{}]/}},command:{pattern:/(->\s*(?!\s))(?:\s*(?:,\s*)?\b[a-z]\w*(?:\s*\([^()\r\n]*\))?)+(?=\s*;)/i,lookbehind:!0,inside:{function:/\b\w+(?=\s*(?:[,(]|$))/,punctuation:/[,()]/}},annotation:{pattern:/@\w+(?:::\w+)*/,alias:"keyword"},label:{pattern:/#[ \t]*\w+/,alias:"punctuation"},keyword:/\b(?:catch|channels|finally|fragment|grammar|import|lexer|locals|mode|options|parser|returns|throws|tokens)\b/,definition:[{pattern:/\b[a-z]\w*(?=\s*:)/,alias:["rule","class-name"]},{pattern:/\b[A-Z]\w*(?=\s*:)/,alias:["token","constant"]}],constant:/\b[A-Z][A-Z_]*\b/,operator:/\.\.|->|[|~]|[*+?]\??/,punctuation:/[;:()=]/},e.languages.g4=e.languages.antlr4}EE.displayName="apacheconf";EE.aliases=[];function EE(e){e.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/(^[\t ]*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|Type|UserFile|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferedLogs|BufferSize|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CGIDScriptTimeout|CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DTracePrivileges|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|KeepAlive|KeepAliveTimeout|KeptBodySize|LanguagePriority|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|Limit(?:InternalRecursion|Request(?:Body|Fields|FieldSize|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|MMapFile|ModemStandard|ModMimeUsePathInfo|MultiviewsMatch|Mutex|NameVirtualHost|NoProxy|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIETag|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|SRPUnknownUserSeed|SRPVerifierFile|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UserName|UseStapling|VerifyClient|VerifyDepth)|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:[\w=],?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/}}SE.displayName="apex";SE.aliases=[];function SE(e){e.register(zt),e.register(Tc),(function(t){var n=/\b(?:(?:after|before)(?=\s+[a-z])|abstract|activate|and|any|array|as|asc|autonomous|begin|bigdecimal|blob|boolean|break|bulk|by|byte|case|cast|catch|char|class|collect|commit|const|continue|currency|date|datetime|decimal|default|delete|desc|do|double|else|end|enum|exception|exit|export|extends|final|finally|float|for|from|get(?=\s*[{};])|global|goto|group|having|hint|if|implements|import|in|inner|insert|instanceof|int|integer|interface|into|join|like|limit|list|long|loop|map|merge|new|not|null|nulls|number|object|of|on|or|outer|override|package|parallel|pragma|private|protected|public|retrieve|return|rollback|select|set|short|sObject|sort|static|string|super|switch|synchronized|system|testmethod|then|this|throw|time|transaction|transient|trigger|try|undelete|update|upsert|using|virtual|void|webservice|when|where|while|(?:inherited|with|without)\s+sharing)\b/i,s=/\b(?:(?=[a-z_]\w*\s*[<\[])|(?!<keyword>))[A-Z_]\w*(?:\s*\.\s*[A-Z_]\w*)*\b(?:\s*(?:\[\s*\]|<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>))*/.source.replace(/<keyword>/g,function(){return n.source});function a(u){return RegExp(u.replace(/<CLASS-NAME>/g,function(){return s}),"i")}var o={keyword:n,punctuation:/[()\[\]{};,:.<>]/};t.languages.apex={comment:t.languages.clike.comment,string:t.languages.clike.string,sql:{pattern:/((?:[=,({:]|\breturn)\s*)\[[^\[\]]*\]/i,lookbehind:!0,greedy:!0,alias:"language-sql",inside:t.languages.sql},annotation:{pattern:/@\w+\b/,alias:"punctuation"},"class-name":[{pattern:a(/(\b(?:class|enum|extends|implements|instanceof|interface|new|trigger\s+\w+\s+on)\s+)<CLASS-NAME>/.source),lookbehind:!0,inside:o},{pattern:a(/(\(\s*)<CLASS-NAME>(?=\s*\)\s*[\w(])/.source),lookbehind:!0,inside:o},{pattern:a(/<CLASS-NAME>(?=\s*\w+\s*[;=,(){:])/.source),inside:o}],trigger:{pattern:/(\btrigger\s+)\w+\b/i,lookbehind:!0,alias:"class-name"},keyword:n,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/(?:\B\.\d+|\b\d+(?:\.\d+|L)?)\b/i,operator:/[!=](?:==?)?|\?\.?|&&|\|\||--|\+\+|[-+*/^&|]=?|:|<<?=?|>{1,3}=?/,punctuation:/[()\[\]{};,.]/}})(e)}_E.displayName="apl";_E.aliases=[];function _E(e){e.languages.apl={comment:/(?:⍝|#[! ]).*$/m,string:{pattern:/'(?:[^'\r\n]|'')*'/,greedy:!0},number:/¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+)?|¯|∞))?/i,statement:/:[A-Z][a-z][A-Za-z]*\b/,"system-function":{pattern:/⎕[A-Z]+/i,alias:"function"},constant:/[⍬⌾#⎕⍞]/,function:/[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,"monadic-operator":{pattern:/[\\\/⌿⍀¨⍨⌶&∥]/,alias:"operator"},"dyadic-operator":{pattern:/[.⍣⍠⍤∘⌸@⌺⍥]/,alias:"operator"},assignment:{pattern:/←/,alias:"keyword"},punctuation:/[\[;\]()◇⋄]/,dfn:{pattern:/[{}⍺⍵⍶⍹∇⍫:]/,alias:"builtin"}}}wE.displayName="applescript";wE.aliases=[];function wE(e){e.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,"class-name":/\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/,punctuation:/[{}():,¬«»《》]/}}CE.displayName="aql";CE.aliases=[];function CE(e){e.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},identifier:{pattern:/([´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*\{)/i}],function:/\b(?!\d)\w+(?=\s*\()/,boolean:/\b(?:false|true)\b/i,range:{pattern:/\.\./,alias:"operator"},number:[/\b0b[01]+/i,/\b0x[0-9a-f]+/i,/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i],operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}}NE.displayName="arff";NE.aliases=[];function NE(e){e.languages.arff={comment:/%.*/,string:{pattern:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/@(?:attribute|data|end|relation)\b/i,number:/\b\d+(?:\.\d+)?\b/,punctuation:/[{},]/}}TE.displayName="armasm";TE.aliases=["arm-asm"];function TE(e){e.languages.armasm={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\r\n]|"")*"/,greedy:!0,inside:{variable:{pattern:/((?:^|[^$])(?:\${2})*)\$\w+/,lookbehind:!0}}},char:{pattern:/'(?:[^'\r\n]{0,4}|'')'/,greedy:!0},"version-symbol":{pattern:/\|[\w@]+\|/,greedy:!0,alias:"property"},boolean:/\b(?:FALSE|TRUE)\b/,directive:{pattern:/\b(?:ALIAS|ALIGN|AREA|ARM|ASSERT|ATTR|CN|CODE|CODE16|CODE32|COMMON|CP|DATA|DCB|DCD|DCDO|DCDU|DCFD|DCFDU|DCI|DCQ|DCQU|DCW|DCWU|DN|ELIF|ELSE|END|ENDFUNC|ENDIF|ENDP|ENTRY|EQU|EXPORT|EXPORTAS|EXTERN|FIELD|FILL|FN|FUNCTION|GBLA|GBLL|GBLS|GET|GLOBAL|IF|IMPORT|INCBIN|INCLUDE|INFO|KEEP|LCLA|LCLL|LCLS|LTORG|MACRO|MAP|MEND|MEXIT|NOFP|OPT|PRESERVE8|PROC|QN|READONLY|RELOC|REQUIRE|REQUIRE8|RLIST|ROUT|SETA|SETL|SETS|SN|SPACE|SUBT|THUMB|THUMBX|TTL|WEND|WHILE)\b/,alias:"property"},instruction:{pattern:/((?:^|(?:^|[^\\])(?:\r\n?|\n))[ \t]*(?:(?:[A-Z][A-Z0-9_]*[a-z]\w*|[a-z]\w*|\d+)[ \t]+)?)\b[A-Z.]+\b/,lookbehind:!0,alias:"keyword"},variable:/\$\w+/,number:/(?:\b[2-9]_\d+|(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e-?\d+)?|\b0(?:[fd]_|x)[0-9a-f]+|&[0-9a-f]+)\b/i,register:{pattern:/\b(?:r\d|lr)\b/,alias:"symbol"},operator:/<>|<<|>>|&&|\|\||[=!<>/]=?|[+\-*%#?&|^]|:[A-Z]+:/,punctuation:/[()[\],]/},e.languages["arm-asm"]=e.languages.armasm}AE.displayName="arturo";AE.aliases=["art"];function AE(e){(function(t){var n=function(s,a){return{pattern:RegExp(/\{!/.source+"(?:"+(a||s)+")"+/$[\s\S]*\}/.source,"m"),greedy:!0,inside:{embedded:{pattern:/(^\{!\w+\b)[\s\S]+(?=\}$)/,lookbehind:!0,alias:"language-"+s,inside:t.languages[s]},string:/[\s\S]+/}}};t.languages.arturo={comment:{pattern:/;.*/,greedy:!0},character:{pattern:/`.`/,alias:"char",greedy:!0},number:{pattern:/\b\d+(?:\.\d+(?:\.\d+(?:-[\w+-]+)?)?)?\b/},string:{pattern:/"(?:[^"\\\r\n]|\\.)*"/,greedy:!0},regex:{pattern:/\{\/.*?\/\}/,greedy:!0},"html-string":n("html"),"css-string":n("css"),"js-string":n("js"),"md-string":n("md"),"sql-string":n("sql"),"sh-string":n("shell","sh"),multistring:{pattern:/».*|\{:[\s\S]*?:\}|\{[\s\S]*?\}|^-{6}$[\s\S]*/m,alias:"string",greedy:!0},label:{pattern:/\w+\b\??:/,alias:"property"},literal:{pattern:/'(?:\w+\b\??:?)/,alias:"constant"},type:{pattern:/:(?:\w+\b\??:?)/,alias:"class-name"},color:/#\w+/,predicate:{pattern:/\b(?:all|and|any|ascii|attr|attribute|attributeLabel|binary|block|char|contains|database|date|dictionary|empty|equal|even|every|exists|false|floating|function|greater|greaterOrEqual|if|in|inline|integer|is|key|label|leap|less|lessOrEqual|literal|logical|lower|nand|negative|nor|not|notEqual|null|numeric|odd|or|path|pathLabel|positive|prefix|prime|regex|same|set|some|sorted|standalone|string|subset|suffix|superset|symbol|symbolLiteral|true|try|type|unless|upper|when|whitespace|word|xnor|xor|zero)\?/,alias:"keyword"},"builtin-function":{pattern:/\b(?:abs|acos|acosh|acsec|acsech|actan|actanh|add|after|alert|alias|and|angle|append|arg|args|arity|array|as|asec|asech|asin|asinh|atan|atan2|atanh|attr|attrs|average|before|benchmark|blend|break|call|capitalize|case|ceil|chop|clear|clip|close|color|combine|conj|continue|copy|cos|cosh|crc|csec|csech|ctan|ctanh|cursor|darken|dec|decode|define|delete|desaturate|deviation|dialog|dictionary|difference|digest|digits|div|do|download|drop|dup|e|else|empty|encode|ensure|env|escape|execute|exit|exp|extend|extract|factors|fdiv|filter|first|flatten|floor|fold|from|function|gamma|gcd|get|goto|hash|hypot|if|inc|indent|index|infinity|info|input|insert|inspect|intersection|invert|jaro|join|keys|kurtosis|last|let|levenshtein|lighten|list|ln|log|loop|lower|mail|map|match|max|median|min|mod|module|mul|nand|neg|new|nor|normalize|not|now|null|open|or|outdent|pad|palette|panic|path|pause|permissions|permutate|pi|pop|popup|pow|powerset|powmod|prefix|print|prints|process|product|query|random|range|read|relative|remove|rename|render|repeat|replace|request|return|reverse|round|sample|saturate|script|sec|sech|select|serve|set|shl|shr|shuffle|sin|sinh|size|skewness|slice|sort|spin|split|sqrt|squeeze|stack|strip|sub|suffix|sum|switch|symbols|symlink|sys|take|tan|tanh|terminal|terminate|to|truncate|try|type|unclip|union|unique|unless|until|unzip|upper|values|var|variance|volume|webview|while|with|wordwrap|write|xnor|xor|zip)\b/,alias:"keyword"},sugar:{pattern:/->|=>|\||::/,alias:"operator"},punctuation:/[()[\],]/,symbol:{pattern:/<:|-:|ø|@|#|\+|\||\*|\$|---|-|%|\/|\.\.|\^|~|=|<|>|\\/},boolean:{pattern:/\b(?:false|maybe|true)\b/}},t.languages.art=t.languages.arturo})(e)}kE.displayName="asciidoc";kE.aliases=["adoc"];function kE(e){(function(t){var n={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},s=t.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})$[\s\S]*?^\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*](?:[<^>](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})$[\s\S]*?^\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:CAUTION|IMPORTANT|NOTE|TIP|WARNING):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)<?\d*>/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|R|TM)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function a(o){o=o.split(" ");for(var u={},c=0,d=o.length;c<d;c++)u[o[c]]=s[o[c]];return u}n.inside.interpreted.inside.rest=a("macro inline replacement entity"),s["passthrough-block"].inside.rest=a("macro"),s["literal-block"].inside.rest=a("callout"),s.table.inside.rest=a("comment-block passthrough-block literal-block other-block list-punctuation indented-block comment title attribute-entry attributes hr page-break admonition list-label callout macro inline replacement entity line-continuation"),s["other-block"].inside.rest=a("table list-punctuation indented-block comment attribute-entry attributes hr page-break admonition list-label macro inline replacement entity line-continuation"),s.title.inside.rest=a("macro inline replacement entity"),t.hooks.add("wrap",function(o){o.type==="entity"&&(o.attributes.title=o.content.value.replace(/&/,"&"))}),t.languages.adoc=t.languages.asciidoc})(e)}RE.displayName="aspnet";RE.aliases=[];function RE(e){e.register(jo),e.register(ur),e.languages.aspnet=e.languages.extend("markup",{"page-directive":{pattern:/<%\s*@.*%>/,alias:"tag",inside:{"page-directive":{pattern:/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,alias:"tag"},rest:e.languages.markup.tag.inside}},directive:{pattern:/<%.*%>/,alias:"tag",inside:{directive:{pattern:/<%\s*?[$=%#:]{0,2}|%>/,alias:"tag"},rest:e.languages.csharp}}}),e.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,e.languages.insertBefore("inside","punctuation",{directive:e.languages.aspnet.directive},e.languages.aspnet.tag.inside["attr-value"]),e.languages.insertBefore("aspnet","comment",{"asp-comment":{pattern:/<%--[\s\S]*?--%>/,alias:["asp","comment"]}}),e.languages.insertBefore("aspnet",e.languages.javascript?"script":"tag",{"asp-script":{pattern:/(<script(?=.*runat=['"]?server\b)[^>]*>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,alias:["asp","script"],inside:e.languages.csharp||{}}})}DE.displayName="asm6502";DE.aliases=[];function DE(e){e.languages.asm6502={comment:/;.*/,directive:{pattern:/\.\w+(?= )/,alias:"property"},string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,"op-code":{pattern:/\b(?:ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA|adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{1,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[xya]\b/i,alias:"variable"},punctuation:/[(),:]/}}IE.displayName="asmatmel";IE.aliases=[];function IE(e){e.languages.asmatmel={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},constant:/\b(?:PORT[A-Z]|DDR[A-Z]|(?:DD|P)[A-Z](?:\d|[0-2]\d|3[01]))\b/,directive:{pattern:/\.\w+(?= )/,alias:"property"},"r-register":{pattern:/\br(?:\d|[12]\d|3[01])\b/,alias:"variable"},"op-code":{pattern:/\b(?:ADC|ADD|ADIW|AND|ANDI|ASR|BCLR|BLD|BRBC|BRBS|BRCC|BRCS|BREAK|BREQ|BRGE|BRHC|BRHS|BRID|BRIE|BRLO|BRLT|BRMI|BRNE|BRPL|BRSH|BRTC|BRTS|BRVC|BRVS|BSET|BST|CALL|CBI|CBR|CLC|CLH|CLI|CLN|CLR|CLS|CLT|CLV|CLZ|COM|CP|CPC|CPI|CPSE|DEC|DES|EICALL|EIJMP|ELPM|EOR|FMUL|FMULS|FMULSU|ICALL|IJMP|IN|INC|JMP|LAC|LAS|LAT|LD|LD[A-Za-z0-9]|LPM|LSL|LSR|MOV|MOVW|MUL|MULS|MULSU|NEG|NOP|OR|ORI|OUT|POP|PUSH|RCALL|RET|RETI|RJMP|ROL|ROR|SBC|SBCI|SBI|SBIC|SBIS|SBIW|SBR|SBRC|SBRS|SEC|SEH|SEI|SEN|SER|SES|SET|SEV|SEZ|SLEEP|SPM|ST|ST[A-Z0-9]|SUB|SUBI|SWAP|TST|WDR|XCH|adc|add|adiw|and|andi|asr|bclr|bld|brbc|brbs|brcc|brcs|break|breq|brge|brhc|brhs|brid|brie|brlo|brlt|brmi|brne|brpl|brsh|brtc|brts|brvc|brvs|bset|bst|call|cbi|cbr|clc|clh|cli|cln|clr|cls|clt|clv|clz|com|cp|cpc|cpi|cpse|dec|des|eicall|eijmp|elpm|eor|fmul|fmuls|fmulsu|icall|ijmp|in|inc|jmp|lac|las|lat|ld|ld[a-z0-9]|lpm|lsl|lsr|mov|movw|mul|muls|mulsu|neg|nop|or|ori|out|pop|push|rcall|ret|reti|rjmp|rol|ror|sbc|sbci|sbi|sbic|sbis|sbiw|sbr|sbrc|sbrs|sec|seh|sei|sen|ser|ses|set|sev|sez|sleep|spm|st|st[a-zA-Z0-9]|sub|subi|swap|tst|wdr|xch)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{2,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[acznvshtixy]\b/i,alias:"variable"},operator:/>>=?|<<=?|&[&=]?|\|[\|=]?|[-+*/%^!=<>?]=?/,punctuation:/[(),:]/}}jE.displayName="autohotkey";jE.aliases=[];function jE(e){e.languages.autohotkey={comment:[{pattern:/(^|\s);.*/,lookbehind:!0},{pattern:/(^[\t ]*)\/\*(?:[\r\n](?![ \t]*\*\/)|[^\r\n])*(?:[\r\n][ \t]*\*\/)?/m,lookbehind:!0,greedy:!0}],tag:{pattern:/^([ \t]*)[^\s,`":]+(?=:[ \t]*$)/m,lookbehind:!0},string:/"(?:[^"\n\r]|"")*"/,variable:/%\w+%/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,boolean:/\b(?:false|true)\b/,command:{pattern:/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,alias:"selector"},constant:/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guicontrol|a_guicontrolevent|a_guievent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles)\b/i,builtin:/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|format|il_add|il_create|il_destroy|instr|isfunc|islabel|IsObject|ln|log|ltrim|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|numget|numput|onmessage|regexmatch|regexreplace|registercallback|round|rtrim|sb_seticon|sb_setparts|sb_settext|sin|sqrt|strlen|strreplace|strsplit|substr|tan|tv_add|tv_delete|tv_get|tv_getchild|tv_getcount|tv_getnext|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__Call|__Get|__New|__Set)\b/i,symbol:/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,directive:{pattern:/#[a-z]+\b/i,alias:"important"},keyword:/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Catch|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|Finally|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|Region|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Throw|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|Try|TryAgain|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i,function:/[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/,punctuation:/[{}[\]():,]/}}OE.displayName="autoit";OE.aliases=[];function OE(e){e.languages.autoit={comment:[/;.*/,{pattern:/(^[\t ]*)#(?:comments-start|cs)[\s\S]*?^[ \t]*#(?:ce|comments-end)/m,lookbehind:!0}],url:{pattern:/(^[\t ]*#include\s+)(?:<[^\r\n>]+>|"[^\r\n"]+")/m,lookbehind:!0},string:{pattern:/(["'])(?:\1\1|(?!\1)[^\r\n])*\1/,greedy:!0,inside:{variable:/([%$@])\w+\1/}},directive:{pattern:/(^[\t ]*)#[\w-]+/m,lookbehind:!0,alias:"keyword"},function:/\b\w+(?=\()/,variable:/[$@]\w+/,keyword:/\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,boolean:/\b(?:False|True)\b/i,operator:/<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Not|Or)\b/i,punctuation:/[\[\]().,:]/}}LE.displayName="avisynth";LE.aliases=["avs"];function LE(e){(function(t){function n(h,p){return h.replace(/<<(\d+)>>/g,function(m,g){return p[+g]})}function s(h,p,m){return RegExp(n(h,p),m)}var a=/bool|clip|float|int|string|val/.source,o=[/is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?/.source,/apply|assert|default|eval|import|nop|select|undefined/.source,/opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)/.source,/hex(?:value)?|value/.source,/abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt/.source,/a?sinh?|a?cosh?|a?tan[2h]?/.source,/(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))/.source,/average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/.source,/getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams/.source,/chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)/.source,/isversionorgreater|version(?:number|string)/.source,/buildpixeltype|colorspacenametopixeltype/.source,/addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode/.source].join("|"),u=[/has(?:audio|video)/.source,/height|width/.source,/frame(?:count|rate)|framerate(?:denominator|numerator)/.source,/getparity|is(?:field|frame)based/.source,/bitspercomponent|componentsize|hasalpha|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:va?|y2))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|numcomponents|pixeltype/.source,/audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)/.source].join("|"),c=[/avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource/.source,/coloryuv|convertbacktoyuy2|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:411|420|422|444)|YUY2)|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:chroma|luma)|rgbadjust|show(?:alpha|blue|green|red)|swapuv|tweak|[uv]toy8?|ytouv/.source,/(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract/.source,/addborders|(?:bicubic|bilinear|blackman|gauss|lanczos4|lanczos|point|sinc|spline(?:16|36|64))resize|crop(?:bottom)?|flip(?:horizontal|vertical)|(?:horizontal|vertical)?reduceby2|letterbox|skewrows|turn(?:180|left|right)/.source,/blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen/.source,/trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|io|out)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)/.source,/assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?/.source,/amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|ssrc|supereq|timestretch/.source,/animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?/.source,/imagewriter/.source,/blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version/.source].join("|"),d=[o,u,c].join("|");t.languages.avisynth={comment:[{pattern:/(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],argument:{pattern:s(/\b(?:<<0>>)\s+("?)\w+\1/.source,[a],"i"),inside:{keyword:/^\w+/}},"argument-label":{pattern:/([,(][\s\\]*)\w+\s*=(?!=)/,lookbehind:!0,inside:{"argument-name":{pattern:/^\w+/,alias:"punctuation"},punctuation:/=$/}},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0,inside:{constant:{pattern:/\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/}}}],variable:/\b(?:last)\b/i,boolean:/\b(?:false|no|true|yes)\b/i,keyword:/\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i,constant:/\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/,"builtin-function":{pattern:s(/\b(?:<<0>>)\b/.source,[d],"i"),alias:"function"},"type-cast":{pattern:s(/\b(?:<<0>>)(?=\s*\()/.source,[a],"i"),alias:"keyword"},function:{pattern:/\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,lookbehind:!0},"line-continuation":{pattern:/(^[ \t]*)\\|\\(?=[ \t]*$)/m,lookbehind:!0,alias:"punctuation"},number:/\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,operator:/\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,punctuation:/[{}\[\]();,.]/},t.languages.avs=t.languages.avisynth})(e)}ME.displayName="avro-idl";ME.aliases=["avdl"];function ME(e){e.languages["avro-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0},annotation:{pattern:/@(?:[$\w.-]|`[^\r\n`]+`)+/,greedy:!0,alias:"function"},"function-identifier":{pattern:/`[^\r\n`]+`(?=\s*\()/,greedy:!0,alias:"function"},identifier:{pattern:/`[^\r\n`]+`/,greedy:!0},"class-name":{pattern:/(\b(?:enum|error|protocol|record|throws)\b\s+)[$\w]+/,lookbehind:!0,greedy:!0},keyword:/\b(?:array|boolean|bytes|date|decimal|double|enum|error|false|fixed|float|idl|import|int|local_timestamp_ms|long|map|null|oneway|protocol|record|schema|string|throws|time_ms|timestamp_ms|true|union|uuid|void)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:[{pattern:/(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i,lookbehind:!0},/-?\b(?:Infinity|NaN)\b/],operator:/=/,punctuation:/[()\[\]{}<>.:,;-]/},e.languages.avdl=e.languages["avro-idl"]}FE.displayName="awk";FE.aliases=["gawk"];function FE(e){e.languages.awk={hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(^|[^\\])"(?:[^\\"\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},regex:{pattern:/((?:^|[^\w\s)])\s*)\/(?:[^\/\\\r\n]|\\.)*\//,lookbehind:!0,greedy:!0},variable:/\$\w+/,keyword:/\b(?:BEGIN|BEGINFILE|END|ENDFILE|break|case|continue|default|delete|do|else|exit|for|function|getline|if|in|next|nextfile|printf?|return|switch|while)\b|@(?:include|load)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[a-fA-F0-9]+)\b/,operator:/--|\+\+|!?~|>&|>>|<<|(?:\*\*|[<>!=+\-*/%^])=?|&&|\|[|&]|[?:]/,punctuation:/[()[\]{},;]/},e.languages.gawk=e.languages.awk}PE.displayName="batch";PE.aliases=[];function PE(e){(function(t){var n=/%%?[~:\w]+%?|!\S+!/,s={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},a=/"(?:[\\"]"|[^"])*"(?!")/,o=/(?:\b|-)\d+\b/;t.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:a,parameter:s,variable:n,number:o,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:a,parameter:s,variable:n,number:o,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:a,parameter:s,variable:[n,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:o,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,lookbehind:!0,inside:{keyword:/^\w+\b/,string:a,parameter:s,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:n,number:o,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}})(e)}BE.displayName="bbcode";BE.aliases=["shortcode"];function BE(e){e.languages.bbcode={tag:{pattern:/\[\/?[^\s=\]]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))?(?:\s+[^\s=\]]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))*\s*\]/,inside:{tag:{pattern:/^\[\/?[^\s=\]]+/,inside:{punctuation:/^\[\/?/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\]/,"attr-name":/[^\s=\]]+/}}},e.languages.shortcode=e.languages.bbcode}UE.displayName="bbj";UE.aliases=[];function UE(e){(function(t){t.languages.bbj={comment:{pattern:/(^|[^\\:])rem\s+.*/i,lookbehind:!0,greedy:!0},string:{pattern:/(['"])(?:(?!\1|\\).|\\.)*\1/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:abstract|all|argc|begin|bye|callback|case|chn|class|classend|ctl|day|declare|delete|dim|dom|dread|dsz|else|end|endif|err|exitto|extends|fi|field|for|from|gosub|goto|if|implements|interface|interfaceend|iol|iolist|let|list|load|method|methodend|methodret|on|opts|pfx|print|private|process_events|protected|psz|public|read|read_resource|release|remove_callback|repeat|restore|return|rev|seterr|setesc|sqlchn|sqlunt|ssn|start|static|swend|switch|sys|then|tim|unt|until|use|void|wend|where|while)\b/i,function:/\b\w+(?=\()/,boolean:/\b(?:BBjAPI\.TRUE|BBjAPI\.FALSE)\b/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:and|not|or|xor)\b/i,punctuation:/[.,;:()]/}})(e)}HE.displayName="bicep";HE.aliases=[];function HE(e){e.languages.bicep={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],property:[{pattern:/([\r\n][ \t]*)[a-z_]\w*(?=[ \t]*:)/i,lookbehind:!0},{pattern:/([\r\n][ \t]*)'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'(?=[ \t]*:)/,lookbehind:!0,greedy:!0}],string:[{pattern:/'''[^'][\s\S]*?'''/,greedy:!0},{pattern:/(^|[^\\'])'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0}],"interpolated-string":{pattern:/(^|[^\\'])'(?:\\.|\$(?:(?!\{)|\{[^{}\r\n]*\})|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}\r\n]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0},punctuation:/^\$\{|\}$/}},string:/[\s\S]+/}},datatype:{pattern:/(\b(?:output|param)\b[ \t]+\w+[ \t]+)\w+\b/,lookbehind:!0,alias:"class-name"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:existing|for|if|in|module|null|output|param|resource|targetScope|var)\b/,decorator:/@\w+\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,punctuation:/[{}[\];(),.:]/},e.languages.bicep["interpolated-string"].inside.interpolation.inside.expression.inside=e.languages.bicep}$E.displayName="birb";$E.aliases=[];function $E(e){e.register(zt),e.languages.birb=e.languages.extend("clike",{string:{pattern:/r?("|')(?:\\.|(?!\1)[^\\])*\1/,greedy:!0},"class-name":[/\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/,/\b(?:[A-Z]\w*|(?!(?:var|void)\b)[a-z]\w*)(?=\s+\w+\s*[;,=()])/],keyword:/\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/,operator:/\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,variable:/\b[a-z_]\w*\b/}),e.languages.insertBefore("birb","function",{metadata:{pattern:/<\w+>/,greedy:!0,alias:"symbol"}})}zE.displayName="bison";zE.aliases=[];function zE(e){e.register(zs),e.languages.bison=e.languages.extend("c",{}),e.languages.insertBefore("bison","comment",{bison:{pattern:/^(?:[^%]|%(?!%))*%%[\s\S]*?%%/,inside:{c:{pattern:/%\{[\s\S]*?%\}|\{(?:\{[^}]*\}|[^{}])*\}/,inside:{delimiter:{pattern:/^%?\{|%?\}$/,alias:"punctuation"},"bison-variable":{pattern:/[$@](?:<[^\s>]+>)?[\w$]+/,alias:"variable",inside:{punctuation:/<|>/}},rest:e.languages.c}},comment:e.languages.c.comment,string:e.languages.c.string,property:/\S+(?=:)/,keyword:/%\w+/,number:{pattern:/(^|[^@])\b(?:0x[\da-f]+|\d+)/i,lookbehind:!0},punctuation:/%[%?]|[|:;\[\]<>]/}}})}GE.displayName="bnf";GE.aliases=["rbnf"];function GE(e){e.languages.bnf={string:{pattern:/"[^\r\n"]*"|'[^\r\n']*'/},definition:{pattern:/<[^<>\r\n\t]+>(?=\s*::=)/,alias:["rule","keyword"],inside:{punctuation:/^<|>$/}},rule:{pattern:/<[^<>\r\n\t]+>/,inside:{punctuation:/^<|>$/}},operator:/::=|[|()[\]{}*+?]|\.{3}/},e.languages.rbnf=e.languages.bnf}qE.displayName="bqn";qE.aliases=[];function qE(e){e.languages.bqn={shebang:{pattern:/^#![ \t]*\/.*/,alias:"important",greedy:!0},comment:{pattern:/#.*/,greedy:!0},"string-literal":{pattern:/"(?:[^"]|"")*"/,greedy:!0,alias:"string"},"character-literal":{pattern:/'(?:[\s\S]|[\uD800-\uDBFF][\uDC00-\uDFFF])'/,greedy:!0,alias:"char"},function:/•[\w¯.∞π]+[\w¯.∞π]*/,"dot-notation-on-brackets":{pattern:/\{(?=.*\}\.)|\}\./,alias:"namespace"},"special-name":{pattern:/(?:𝕨|𝕩|𝕗|𝕘|𝕤|𝕣|𝕎|𝕏|𝔽|𝔾|𝕊|_𝕣_|_𝕣)/,alias:"keyword"},"dot-notation-on-name":{pattern:/[A-Za-z_][\w¯∞π]*\./,alias:"namespace"},"word-number-scientific":{pattern:/\d+(?:\.\d+)?[eE]¯?\d+/,alias:"number"},"word-name":{pattern:/[A-Za-z_][\w¯∞π]*/,alias:"symbol"},"word-number":{pattern:/[¯∞π]?(?:\d*\.?\b\d+(?:e[+¯]?\d+|E[+¯]?\d+)?|¯|∞|π)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+|E[+¯]?\d+)?|¯|∞|π))?/,alias:"number"},"null-literal":{pattern:/@/,alias:"char"},"primitive-functions":{pattern:/[-+×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍⋈↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!]/,alias:"operator"},"primitive-1-operators":{pattern:/[`˜˘¨⁼⌜´˝˙]/,alias:"operator"},"primitive-2-operators":{pattern:/[∘⊸⟜○⌾⎉⚇⍟⊘◶⎊]/,alias:"operator"},punctuation:/[←⇐↩(){}⟨⟩[\]‿·⋄,.;:?]/}}WE.displayName="brainfuck";WE.aliases=[];function WE(e){e.languages.brainfuck={pointer:{pattern:/<|>/,alias:"keyword"},increment:{pattern:/\+/,alias:"inserted"},decrement:{pattern:/-/,alias:"deleted"},branching:{pattern:/\[|\]/,alias:"important"},operator:/[.,]/,comment:/\S+/}}VE.displayName="brightscript";VE.aliases=[];function VE(e){e.languages.brightscript={comment:/(?:\brem|').*/i,"directive-statement":{pattern:/(^[\t ]*)#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if).*/im,lookbehind:!0,alias:"property",inside:{"error-message":{pattern:/(^#error).+/,lookbehind:!0},directive:{pattern:/^#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if)/,alias:"keyword"},expression:{pattern:/[\s\S]+/,inside:null}}},property:{pattern:/([\r\n{,][\t ]*)(?:(?!\d)\w+|"(?:[^"\r\n]|"")*"(?!"))(?=[ \t]*:)/,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},"class-name":{pattern:/(\bAs[\t ]+)\w+/i,lookbehind:!0},keyword:/\b(?:As|Dim|Each|Else|Elseif|End|Exit|For|Function|Goto|If|In|Print|Return|Step|Stop|Sub|Then|To|While)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?!\d)\w+(?=[\t ]*\()/,number:/(?:\b\d+(?:\.\d+)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b[%&!#]?/i,operator:/--|\+\+|>>=?|<<=?|<>|[-+*/\\<>]=?|[:^=?]|\b(?:and|mod|not|or)\b/i,punctuation:/[.,;()[\]{}]/,constant:/\b(?:LINE_NUM)\b/i},e.languages.brightscript["directive-statement"].inside.expression.inside=e.languages.brightscript}YE.displayName="bro";YE.aliases=[];function YE(e){e.languages.bro={comment:{pattern:/(^|[^\\$])#.*/,lookbehind:!0,inside:{italic:/\b(?:FIXME|TODO|XXX)\b/}},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},boolean:/\b[TF]\b/,function:{pattern:/(\b(?:event|function|hook)[ \t]+)\w+(?:::\w+)?/,lookbehind:!0},builtin:/(?:@(?:load(?:-(?:plugin|sigs))?|unload|prefixes|ifn?def|else|(?:end)?if|DIR|FILENAME))|(?:&?(?:add_func|create_expire|default|delete_func|encrypt|error_handler|expire_func|group|log|mergeable|optional|persistent|priority|raw_output|read_expire|redef|rotate_interval|rotate_size|synchronized|type_column|write_expire))/,constant:{pattern:/(\bconst[ \t]+)\w+/i,lookbehind:!0},keyword:/\b(?:add|addr|alarm|any|bool|break|const|continue|count|delete|double|else|enum|event|export|file|for|function|global|hook|if|in|int|interval|local|module|next|of|opaque|pattern|port|print|record|return|schedule|set|string|subnet|table|time|timeout|using|vector|when)\b/,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,punctuation:/[{}[\];(),.:]/}}KE.displayName="bsl";KE.aliases=["oscript"];function KE(e){e.languages.bsl={comment:/\/\/.*/,string:[{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},{pattern:/'(?:[^'\r\n\\]|\\.)*'/}],keyword:[{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:пока|для|новый|прервать|попытка|исключение|вызватьисключение|иначе|конецпопытки|неопределено|функция|перем|возврат|конецфункции|если|иначеесли|процедура|конецпроцедуры|тогда|знач|экспорт|конецесли|из|каждого|истина|ложь|по|цикл|конеццикла|выполнить)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:break|do|each|else|elseif|enddo|endfunction|endif|endprocedure|endtry|except|execute|export|false|for|function|if|in|new|null|procedure|raise|return|then|to|true|try|undefined|val|var|while)\b/i}],number:{pattern:/(^(?=\d)|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?/i,lookbehind:!0},operator:[/[<>+\-*/]=?|[%=]/,{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:и|или|не)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:and|not|or)\b/i}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/,directive:[{pattern:/^([ \t]*)&.*/m,lookbehind:!0,greedy:!0,alias:"important"},{pattern:/^([ \t]*)#.*/gm,lookbehind:!0,greedy:!0,alias:"important"}]},e.languages.oscript=e.languages.bsl}XE.displayName="cfscript";XE.aliases=["cfc"];function XE(e){e.register(zt),e.languages.cfscript=e.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,inside:{annotation:{pattern:/(?:^|[^.])@[\w\.]+/,alias:"punctuation"}}},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],keyword:/\b(?:abstract|break|catch|component|continue|default|do|else|extends|final|finally|for|function|if|in|include|package|private|property|public|remote|required|rethrow|return|static|switch|throw|try|var|while|xml)\b(?!\s*=)/,operator:[/\+\+|--|&&|\|\||::|=>|[!=]==|[-+*/%&|^!=<>]=?|\?(?:\.|:)?|:/,/\b(?:and|contains|eq|equal|eqv|gt|gte|imp|is|lt|lte|mod|not|or|xor)\b/],scope:{pattern:/\b(?:application|arguments|cgi|client|cookie|local|session|super|this|variables)\b/,alias:"global"},type:{pattern:/\b(?:any|array|binary|boolean|date|guid|numeric|query|string|struct|uuid|void|xml)\b/,alias:"builtin"}}),e.languages.insertBefore("cfscript","keyword",{"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"}}),delete e.languages.cfscript["class-name"],e.languages.cfc=e.languages.cfscript}ZE.displayName="chaiscript";ZE.aliases=[];function ZE(e){e.register(zt),e.register(Io),e.languages.chaiscript=e.languages.extend("clike",{string:{pattern:/(^|[^\\])'(?:[^'\\]|\\[\s\S])*'/,lookbehind:!0,greedy:!0},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},{pattern:/(\b(?:attr|def)\s+)\w+(?=\s*::)/,lookbehind:!0}],keyword:/\b(?:attr|auto|break|case|catch|class|continue|def|default|else|finally|for|fun|global|if|return|switch|this|try|var|while)\b/,number:[e.languages.cpp.number,/\b(?:Infinity|NaN)\b/],operator:/>>=?|<<=?|\|\||&&|:[:=]?|--|\+\+|[=!<>+\-*/%|&^]=?|[?~]|`[^`\r\n]{1,4}`/}),e.languages.insertBefore("chaiscript","operator",{"parameter-type":{pattern:/([,(]\s*)\w+(?=\s+\w)/,lookbehind:!0,alias:"class-name"}}),e.languages.insertBefore("chaiscript","string",{"string-interpolation":{pattern:/(^|[^\\])"(?:[^"$\\]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\}/,lookbehind:!0,inside:{"interpolation-expression":{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.chaiscript},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"}}},string:/[\s\S]+/}}})}QE.displayName="cil";QE.aliases=[];function QE(e){e.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:false|true)\b/,number:/\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}}JE.displayName="cilkc";JE.aliases=["cilk-c"];function JE(e){e.register(zs),e.languages.cilkc=e.languages.insertBefore("c","function",{"parallel-keyword":{pattern:/\bcilk_(?:for|reducer|s(?:cope|pawn|ync))\b/,alias:"keyword"}}),e.languages["cilk-c"]=e.languages.cilkc}e1.displayName="cilkcpp";e1.aliases=["cilk","cilk-cpp"];function e1(e){e.register(Io),e.languages.cilkcpp=e.languages.insertBefore("cpp","function",{"parallel-keyword":{pattern:/\bcilk_(?:for|reducer|s(?:cope|pawn|ync))\b/,alias:"keyword"}}),e.languages["cilk-cpp"]=e.languages.cilkcpp,e.languages.cilk=e.languages.cilkcpp}t1.displayName="clojure";t1.aliases=[];function t1(e){e.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},char:/\\\w+/,symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:false|nil|true)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}}n1.displayName="cmake";n1.aliases=[];function n1(e){e.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_NAME|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}}r1.displayName="cobol";r1.aliases=[];function r1(e){e.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}}s1.displayName="coffeescript";s1.aliases=["coffee"];function s1(e){e.register(yr),(function(t){var n=/#(?!\{).+/,s={pattern:/#\{[^}]+\}/,alias:"variable"};t.languages.coffeescript=t.languages.extend("javascript",{comment:n,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:s}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),t.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:n,interpolation:s}}}),t.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:t.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:s}}]}),t.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete t.languages.coffeescript["template-string"],t.languages.coffee=t.languages.coffeescript})(e)}a1.displayName="concurnas";a1.aliases=["conc"];function a1(e){e.languages.concurnas={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*)/,lookbehind:!0,greedy:!0},langext:{pattern:/\b\w+\s*\|\|[\s\S]+?\|\|/,greedy:!0,inside:{"class-name":/^\w+/,string:{pattern:/(^\s*\|\|)[\s\S]+(?=\|\|$)/,lookbehind:!0},punctuation:/\|\|/}},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,lookbehind:!0},keyword:/\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,boolean:/\b(?:false|true)\b/,number:/\b0b[01][01_]*L?\b|\b0x(?:[\da-f_]*\.)?[\da-f_p+-]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,punctuation:/[{}[\];(),.:]/,operator:/<==|>==|=>|->|<-|<>|&==|&<>|\?:?|\.\?|\+\+|--|[-+*/=<>]=?|[!^~]|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,annotation:{pattern:/@(?:\w+:)?(?:\w+|\[[^\]]+\])?/,alias:"builtin"}},e.languages.insertBefore("concurnas","langext",{"regex-literal":{pattern:/\br("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:e.languages.concurnas},regex:/[\s\S]+/}},"string-literal":{pattern:/(?:\B|\bs)("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:e.languages.concurnas},string:/[\s\S]+/}}}),e.languages.conc=e.languages.concurnas}i1.displayName="csp";i1.aliases=[];function i1(e){(function(t){function n(s){return RegExp(/([ \t])/.source+"(?:"+s+")"+/(?=[\s;]|$)/.source,"i")}t.languages.csp={directive:{pattern:/(^|[\s;])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|prefetch|script|style|worker)-src|disown-opener|form-action|frame-(?:ancestors|options)|input-protection(?:-(?:clip|selectors))?|navigate-to|plugin-types|policy-uri|referrer|reflected-xss|report-(?:to|uri)|require-sri-for|sandbox|(?:script|style)-src-(?:attr|elem)|upgrade-insecure-requests)(?=[\s;]|$)/i,lookbehind:!0,alias:"property"},scheme:{pattern:n(/[a-z][a-z0-9.+-]*:/.source),lookbehind:!0},none:{pattern:n(/'none'/.source),lookbehind:!0,alias:"keyword"},nonce:{pattern:n(/'nonce-[-+/\w=]+'/.source),lookbehind:!0,alias:"number"},hash:{pattern:n(/'sha(?:256|384|512)-[-+/\w=]+'/.source),lookbehind:!0,alias:"number"},host:{pattern:n(/[a-z][a-z0-9.+-]*:\/\/[^\s;,']*/.source+"|"+/\*[^\s;,']*/.source+"|"+/[a-z0-9-]+(?:\.[a-z0-9-]+)+(?::[\d*]+)?(?:\/[^\s;,']*)?/.source),lookbehind:!0,alias:"url",inside:{important:/\*/}},keyword:[{pattern:n(/'unsafe-[a-z-]+'/.source),lookbehind:!0,alias:"unsafe"},{pattern:n(/'[a-z-]+'/.source),lookbehind:!0,alias:"safe"}],punctuation:/;/}})(e)}o1.displayName="cooklang";o1.aliases=[];function o1(e){(function(t){var n=/(?:(?!\s)[\d$+<=a-zA-Z\x80-\uFFFF])+/.source,s=/[^{}@#]+/.source,a=/\{[^}#@]*\}/.source,o=s+a,u=/(?:h|hours|hrs|m|min|minutes)/.source,c={pattern:/\{[^{}]*\}/,inside:{amount:{pattern:/([\{|])[^{}|*%]+/,lookbehind:!0,alias:"number"},unit:{pattern:/(%)[^}]+/,lookbehind:!0,alias:"symbol"},"servings-scaler":{pattern:/\*/,alias:"operator"},"servings-alternative-separator":{pattern:/\|/,alias:"operator"},"unit-separator":{pattern:/(?:%|(\*)%)/,lookbehind:!0,alias:"operator"},punctuation:/[{}]/}};t.languages.cooklang={comment:{pattern:/\[-[\s\S]*?-\]|--.*/,greedy:!0},meta:{pattern:/>>.*:.*/,inside:{property:{pattern:/(>>\s*)[^\s:](?:[^:]*[^\s:])?/,lookbehind:!0}}},"cookware-group":{pattern:new RegExp("#(?:"+o+"|"+n+")"),inside:{cookware:{pattern:new RegExp("(^#)(?:"+s+")"),lookbehind:!0,alias:"variable"},"cookware-keyword":{pattern:/^#/,alias:"keyword"},"quantity-group":{pattern:new RegExp(/\{[^{}@#]*\}/),inside:{quantity:{pattern:new RegExp(/(^\{)/.source+s),lookbehind:!0,alias:"number"},punctuation:/[{}]/}}}},"ingredient-group":{pattern:new RegExp("@(?:"+o+"|"+n+")"),inside:{ingredient:{pattern:new RegExp("(^@)(?:"+s+")"),lookbehind:!0,alias:"variable"},"ingredient-keyword":{pattern:/^@/,alias:"keyword"},"amount-group":c}},"timer-group":{pattern:/~(?!\s)[^@#~{}]*\{[^{}]*\}/,inside:{timer:{pattern:/(^~)[^{]+/,lookbehind:!0,alias:"variable"},"duration-group":{pattern:/\{[^{}]*\}/,inside:{punctuation:/[{}]/,unit:{pattern:new RegExp(/(%\s*)/.source+u+/\b/.source),lookbehind:!0,alias:"symbol"},operator:/%/,duration:{pattern:/\d+/,alias:"number"}}},"timer-keyword":{pattern:/^~/,alias:"keyword"}}}}})(e)}l1.displayName="coq";l1.aliases=[];function l1(e){(function(t){for(var n=/\(\*(?:[^(*]|\((?!\*)|\*(?!\))|<self>)*\*\)/.source,s=0;s<2;s++)n=n.replace(/<self>/g,function(){return n});n=n.replace(/<self>/g,"[]"),t.languages.coq={comment:RegExp(n),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp(/#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|<comment>)*\]/.source.replace(/<comment>/g,function(){return n})),greedy:!0,alias:"attr-name",inside:{comment:RegExp(n),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}})(e)}c1.displayName="crystal";c1.aliases=[];function c1(e){e.register(Mo),(function(t){t.languages.crystal=t.languages.extend("ruby",{keyword:[/\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|annotation|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|ifdef|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|ptr|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|undef|uninitialized|union|unless|until|when|while|with|yield)\b/,{pattern:/(\.\s*)(?:is_a|responds_to)\?/,lookbehind:!0}],number:/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/,operator:[/->/,t.languages.ruby.operator],punctuation:/[(){}[\].,;\\]/}),t.languages.insertBefore("crystal","string-literal",{attribute:{pattern:/@\[.*?\]/,inside:{delimiter:{pattern:/^@\[|\]$/,alias:"punctuation"},attribute:{pattern:/^(\s*)\w+/,lookbehind:!0,alias:"class-name"},args:{pattern:/\S(?:[\s\S]*\S)?/,inside:t.languages.crystal}}},expansion:{pattern:/\{(?:\{.*?\}|%.*?%)\}/,inside:{content:{pattern:/^(\{.)[\s\S]+(?=.\}$)/,lookbehind:!0,inside:t.languages.crystal},delimiter:{pattern:/^\{[\{%]|[\}%]\}$/,alias:"operator"}}},char:{pattern:/'(?:[^\\\r\n]{1,2}|\\(?:.|u(?:[A-Fa-f0-9]{1,4}|\{[A-Fa-f0-9]{1,6}\})))'/,greedy:!0}})})(e)}u1.displayName="css-extras";u1.aliases=[];function u1(e){e.register(qi),(function(t){var n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,s;t.languages.css.selector={pattern:t.languages.css.selector.pattern,lookbehind:!0,inside:s={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp(`\\[(?:[^[\\]"']|`+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},t.languages.css.atrule.inside["selector-function-argument"].inside=s,t.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var a={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},o={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};t.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:a,number:o,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:a,number:o})})(e)}d1.displayName="csv";d1.aliases=[];function d1(e){e.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}}h1.displayName="cue";h1.aliases=[];function h1(e){(function(t){var n=/\\(?:(?!\2)|\2(?:[^()\r\n]|\([^()]*\)))/.source,s=/"""(?:[^\\"]|"(?!""\2)|<esc>)*"""/.source+"|"+/'''(?:[^\\']|'(?!''\2)|<esc>)*'''/.source+"|"+/"(?:[^\\\r\n"]|"(?!\2)|<esc>)*"/.source+"|"+/'(?:[^\\\r\n']|'(?!\2)|<esc>)*'/.source,a="(?:"+s.replace(/<esc>/g,n)+")";t.languages.cue={comment:{pattern:/\/\/.*/,greedy:!0},"string-literal":{pattern:RegExp(/(^|[^#"'\\])(#*)/.source+a+/(?!["'])\2/.source),lookbehind:!0,greedy:!0,inside:{escape:{pattern:/(?=[\s\S]*["'](#*)$)\\\1(?:U[a-fA-F0-9]{1,8}|u[a-fA-F0-9]{1,4}|x[a-fA-F0-9]{1,2}|\d{2,3}|[^(])/,greedy:!0,alias:"string"},interpolation:{pattern:/(?=[\s\S]*["'](#*)$)\\\1\([^()]*\)/,greedy:!0,inside:{punctuation:/^\\#*\(|\)$/,expression:{pattern:/[\s\S]+/,inside:null}}},string:/[\s\S]+/}},keyword:{pattern:/(^|[^\w$])(?:for|if|import|in|let|null|package)(?![\w$])/,lookbehind:!0},boolean:{pattern:/(^|[^\w$])(?:false|true)(?![\w$])/,lookbehind:!0},builtin:{pattern:/(^|[^\w$])(?:bool|bytes|float|float(?:32|64)|u?int(?:8|16|32|64|128)?|number|rune|string)(?![\w$])/,lookbehind:!0},attribute:{pattern:/@[\w$]+(?=\s*\()/,alias:"function"},function:{pattern:/(^|[^\w$])[a-z_$][\w$]*(?=\s*\()/i,lookbehind:!0},number:{pattern:/(^|[^\w$.])(?:0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|0[xX][0-9A-Fa-f]+(?:_[0-9A-Fa-f]+)*|(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[eE][+-]?\d+(?:_\d+)*)?(?:[KMGTP]i?)?)(?![\w$])/,lookbehind:!0},operator:/\.{3}|_\|_|&&?|\|\|?|[=!]~|[<>=!]=?|[+\-*/?]/,punctuation:/[()[\]{},.:]/},t.languages.cue["string-literal"].inside.interpolation.inside.expression.inside=t.languages.cue})(e)}f1.displayName="cypher";f1.aliases=[];function f1(e){e.languages.cypher={comment:/\/\/.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,greedy:!0},"class-name":{pattern:/(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,lookbehind:!0,greedy:!0},relationship:{pattern:/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,lookbehind:!0,greedy:!0,alias:"property"},identifier:{pattern:/`(?:[^`\\\r\n])*`/,greedy:!0},variable:/\$\w+/,keyword:/\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,function:/\b\w+\b(?=\s*\()/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,operator:/:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,punctuation:/[()[\]{},;.]/}}p1.displayName="d";p1.aliases=[];function p1(e){e.register(zt),e.languages.d=e.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp(/(^|[^\\])/.source+"(?:"+[/\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source,/\/\/.*/.source,/\/\*[\s\S]*?\*\//.source].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp([/\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source,/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source,/\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source,/\bq"(.)[\s\S]*?\2"/.source,/(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],keyword:/\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,lookbehind:!0}],operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),e.languages.insertBefore("d","string",{char:/'(?:\\(?:\W|\w+)|[^\\])'/}),e.languages.insertBefore("d","keyword",{property:/\B@\w*/}),e.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}})}m1.displayName="dart";m1.aliases=[];function m1(e){e.register(zt),(function(t){var n=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],s=/(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,a={pattern:RegExp(s+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};t.languages.dart=t.languages.extend("clike",{"class-name":[a,{pattern:RegExp(s+/[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source),lookbehind:!0,inside:a.inside}],keyword:n,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),t.languages.insertBefore("dart","string",{"string-literal":{pattern:/r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,lookbehind:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:t.languages.dart}}},string:/[\s\S]+/}},string:void 0}),t.languages.insertBefore("dart","class-name",{metadata:{pattern:/@\w+/,alias:"function"}}),t.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:n,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})})(e)}g1.displayName="dataweave";g1.aliases=[];function g1(e){(function(t){t.languages.dataweave={url:/\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,property:{pattern:/(?:\b\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\b\w+)(?=\s*[:@])/,greedy:!0},string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},"mime-type":/\b(?:application|audio|image|multipart|text|video)\/[\w+-]+/,date:{pattern:/\|[\w:+-]+\|/,greedy:!0},comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],regex:{pattern:/\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,greedy:!0},keyword:/\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/,function:/\b[A-Z_]\w*(?=\s*\()/i,number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\];(),.:@]/,operator:/<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/,boolean:/\b(?:false|true)\b/}})(e)}b1.displayName="dax";b1.aliases=[];function b1(e){e.languages.dax={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,lookbehind:!0},"data-field":{pattern:/'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,alias:"symbol"},measure:{pattern:/\[[ \w\xA0-\uFFFF]+\]/,alias:"constant"},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},function:/\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,keyword:/\b(?:DEFINE|EVALUATE|MEASURE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,boolean:{pattern:/\b(?:FALSE|NULL|TRUE)\b/i,alias:"constant"},number:/\b\d+(?:\.\d*)?|\B\.\d+\b/,operator:/:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,punctuation:/[;\[\](){}`,.]/}}x1.displayName="dhall";x1.aliases=[];function x1(e){e.languages.dhall={comment:/--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,string:{pattern:/"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,alias:"language-dhall",inside:null},punctuation:/\$\{|\}/}}}},label:{pattern:/`[^`]*`/,greedy:!0},url:{pattern:/\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,greedy:!0},env:{pattern:/\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,greedy:!0,inside:{function:/^env/,operator:/^:/,variable:/[\s\S]+/}},hash:{pattern:/\bsha256:[\da-fA-F]{64}\b/,inside:{function:/sha256/,operator:/:/,number:/[\da-fA-F]{64}/}},keyword:/\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,builtin:/\b(?:None|Some)\b/,boolean:/\b(?:False|True)\b/,number:/\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,operator:/\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,punctuation:/\.\.|[{}\[\](),./]/,"class-name":/\b[A-Z]\w*\b/},e.languages.dhall.string.inside.interpolation.inside.expression.inside=e.languages.dhall}v1.displayName="django";v1.aliases=["jinja2"];function v1(e){e.register(Er),(function(t){t.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/};var n=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,s=t.languages["markup-templating"];t.hooks.add("before-tokenize",function(a){s.buildPlaceholders(a,"django",n)}),t.hooks.add("after-tokenize",function(a){s.tokenizePlaceholders(a,"django")}),t.languages.jinja2=t.languages.django,t.hooks.add("before-tokenize",function(a){s.buildPlaceholders(a,"jinja2",n)}),t.hooks.add("after-tokenize",function(a){s.tokenizePlaceholders(a,"jinja2")})})(e)}y1.displayName="dns-zone-file";y1.aliases=["dns-zone"];function y1(e){e.languages["dns-zone-file"]={comment:/;.*/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},variable:[{pattern:/(^\$ORIGIN[ \t]+)\S+/m,lookbehind:!0},{pattern:/(^|\s)@(?=\s|$)/,lookbehind:!0}],keyword:/^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,class:{pattern:/(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,lookbehind:!0,alias:"keyword"},punctuation:/[()]/},e.languages["dns-zone"]=e.languages["dns-zone-file"]}E1.displayName="docker";E1.aliases=["dockerfile"];function E1(e){(function(t){var n=/\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source,s=/(?:[ \t]+(?![ \t])(?:<SP_BS>)?|<SP_BS>)/.source.replace(/<SP_BS>/g,function(){return n}),a=/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source,o=/--[\w-]+=(?:<STR>|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(/<STR>/g,function(){return a}),u={pattern:RegExp(a),greedy:!0},c={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function d(h,p){return h=h.replace(/<OPT>/g,function(){return o}).replace(/<SP>/g,function(){return s}),RegExp(h,p)}t.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:d(/(^(?:ONBUILD<SP>)?\w+<SP>)<OPT>(?:<SP><OPT>)*/.source,"i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[u,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:d(/(^(?:ONBUILD<SP>)?HEALTHCHECK<SP>(?:<OPT><SP>)*)(?:CMD|NONE)\b/.source,"i"),lookbehind:!0,greedy:!0},{pattern:d(/(^(?:ONBUILD<SP>)?FROM<SP>(?:<OPT><SP>)*(?!--)[^ \t\\]+<SP>)AS/.source,"i"),lookbehind:!0,greedy:!0},{pattern:d(/(^ONBUILD<SP>)\w+/.source,"i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:c,string:u,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:c},t.languages.dockerfile=t.languages.docker})(e)}S1.displayName="dot";S1.aliases=["gv"];function S1(e){(function(t){var n="(?:"+[/[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source,/-?(?:\.\d+|\d+(?:\.\d*)?)/.source,/"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source,/<(?:[^<>]|(?!<!--)<(?:[^<>"']|"[^"]*"|'[^']*')+>|<!--(?:[^-]|-(?!->))*-->)*>/.source].join("|")+")",s={markup:{pattern:/(^<)[\s\S]+(?=>$)/,lookbehind:!0,alias:["language-markup","language-html","language-xml"],inside:t.languages.markup}};function a(o,u){return RegExp(o.replace(/<ID>/g,function(){return n}),u)}t.languages.dot={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,greedy:!0},"graph-name":{pattern:a(/(\b(?:digraph|graph|subgraph)[ \t\r\n]+)<ID>/.source,"i"),lookbehind:!0,greedy:!0,alias:"class-name",inside:s},"attr-value":{pattern:a(/(=[ \t\r\n]*)<ID>/.source),lookbehind:!0,greedy:!0,inside:s},"attr-name":{pattern:a(/([\[;, \t\r\n])<ID>(?=[ \t\r\n]*=)/.source),lookbehind:!0,greedy:!0,inside:s},keyword:/\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,"compass-point":{pattern:/(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,lookbehind:!0,alias:"builtin"},node:{pattern:a(/(^|[^-.\w\x80-\uFFFF\\])<ID>/.source),lookbehind:!0,greedy:!0,inside:s},operator:/[=:]|-[->]/,punctuation:/[\[\]{};,]/},t.languages.gv=t.languages.dot})(e)}_1.displayName="ebnf";_1.aliases=[];function _1(e){e.languages.ebnf={comment:/\(\*[\s\S]*?\*\)/,string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},special:{pattern:/\?[^?\r\n]*\?/,greedy:!0,alias:"class-name"},definition:{pattern:/^([\t ]*)[a-z]\w*(?:[ \t]+[a-z]\w*)*(?=\s*=)/im,lookbehind:!0,alias:["rule","keyword"]},rule:/\b[a-z]\w*(?:[ \t]+[a-z]\w*)*\b/i,punctuation:/\([:/]|[:/]\)|[.,;()[\]{}]/,operator:/[-=|*/!]/}}w1.displayName="editorconfig";w1.aliases=[];function w1(e){e.languages.editorconfig={comment:/[;#].*/,section:{pattern:/(^[ \t]*)\[.+\]/m,lookbehind:!0,alias:"selector",inside:{regex:/\\\\[\[\]{},!?.*]/,operator:/[!?]|\.\.|\*{1,2}/,punctuation:/[\[\]{},]/}},key:{pattern:/(^[ \t]*)[^\s=]+(?=[ \t]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/=.*/,alias:"attr-value",inside:{punctuation:/^=/}}}}C1.displayName="eiffel";C1.aliases=[];function C1(e){e.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":/\b[A-Z][\dA-Z_]*\b/,number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}}N1.displayName="ejs";N1.aliases=["eta"];function N1(e){e.register(yr),e.register(Er),(function(t){t.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:t.languages.javascript}},t.hooks.add("before-tokenize",function(n){var s=/<%(?!%)[\s\S]+?%>/g;t.languages["markup-templating"].buildPlaceholders(n,"ejs",s)}),t.hooks.add("after-tokenize",function(n){t.languages["markup-templating"].tokenizePlaceholders(n,"ejs")}),t.languages.eta=t.languages.ejs})(e)}T1.displayName="elixir";T1.aliases=[];function T1(e){e.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},e.languages.elixir.string.forEach(function(t){t.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:e.languages.elixir}}}})}A1.displayName="elm";A1.aliases=[];function A1(e){e.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}}k1.displayName="etlua";k1.aliases=[];function k1(e){e.register(Qd),e.register(Er),(function(t){t.languages.etlua={delimiter:{pattern:/^<%[-=]?|-?%>$/,alias:"punctuation"},"language-lua":{pattern:/[\s\S]+/,inside:t.languages.lua}},t.hooks.add("before-tokenize",function(n){var s=/<%[\s\S]+?%>/g;t.languages["markup-templating"].buildPlaceholders(n,"etlua",s)}),t.hooks.add("after-tokenize",function(n){t.languages["markup-templating"].tokenizePlaceholders(n,"etlua")})})(e)}R1.displayName="erb";R1.aliases=[];function R1(e){e.register(Er),e.register(Mo),(function(t){t.languages.erb={delimiter:{pattern:/^(\s*)<%=?|%>(?=\s*$)/,lookbehind:!0,alias:"punctuation"},ruby:{pattern:/\s*\S[\s\S]*/,alias:"language-ruby",inside:t.languages.ruby}},t.hooks.add("before-tokenize",function(n){var s=/<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g;t.languages["markup-templating"].buildPlaceholders(n,"erb",s)}),t.hooks.add("after-tokenize",function(n){t.languages["markup-templating"].tokenizePlaceholders(n,"erb")})})(e)}D1.displayName="erlang";D1.aliases=[];function D1(e){e.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:after|begin|case|catch|end|fun|if|of|receive|try|when)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/}}I1.displayName="excel-formula";I1.aliases=["xls","xlsx"];function I1(e){e.languages["excel-formula"]={comment:{pattern:/(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},reference:{pattern:/(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,greedy:!0,alias:"string",inside:{operator:/!$/,punctuation:/'/,sheet:{pattern:/[^[\]]+$/,alias:"function"},file:{pattern:/\[[^[\]]+\]$/,inside:{punctuation:/[[\]]/}},path:/[\s\S]+/}},"function-name":{pattern:/\b[A-Z]\w*(?=\()/i,alias:"builtin"},range:{pattern:/\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,alias:"selector",inside:{operator:/:/,cell:/\$?[A-Z]+\$?\d+/i,column:/\$?[A-Z]+/i,row:/\$?\d+/}},cell:{pattern:/\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,alias:"selector"},number:/(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,boolean:/\b(?:FALSE|TRUE)\b/i,operator:/[-+*/^%=&,]|<[=>]?|>=?/,punctuation:/[[\]();{}|]/},e.languages.xlsx=e.languages.xls=e.languages["excel-formula"]}j1.displayName="fsharp";j1.aliases=[];function j1(e){e.register(zt),e.languages.fsharp=e.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,number:[/\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,/\b0b[01]+(?:uy|y)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|<?\|{1,3}>?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),e.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(^#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),e.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/\b[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),e.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,greedy:!0,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:e.languages.fsharp}}},char:{pattern:/'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0}})}O1.displayName="factor";O1.aliases=[];function O1(e){(function(t){var n={function:/\b(?:BUGS?|FIX(?:MES?)?|NOTES?|TODOS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/},s={number:/\\[^\s']|%\w/},a={comment:[{pattern:/(^|\s)(?:! .*|!$)/,lookbehind:!0,inside:n},{pattern:/(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,inside:n}],number:[{pattern:/(^|\s)[+-]?\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)-\d+-\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,lookbehind:!0}],regexp:{pattern:/(^|\s)R\/\s(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,lookbehind:!0,alias:"number",inside:{variable:/\\\S/,keyword:/[+?*\[\]^$(){}.|]/,operator:{pattern:/(\/)[idmsr]+(?:-[idmsr]+)?/,lookbehind:!0}}},boolean:{pattern:/(^|\s)[tf](?=\s|$)/,lookbehind:!0},"custom-string":{pattern:/(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:/\\\S|%\w|\//}},"multiline-string":[{pattern:/(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:s.number,"semicolon-or-setlocal":{pattern:/([\r\n][ \t]*);(?=\s|$)/,lookbehind:!0,alias:"function"}}},{pattern:/(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:s},{pattern:/(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:s}],"special-using":{pattern:/(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,lookbehind:!0,alias:"function",inside:{string:{pattern:/(\s)[^:\s]+/,lookbehind:!0}}},"stack-effect-delimiter":[{pattern:/(^|\s)(?:call|eval|execute)?\((?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)--(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\)(?=\s|$)/,lookbehind:!0,alias:"operator"}],combinators:{pattern:null,lookbehind:!0,alias:"keyword"},"kernel-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"sequences-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"math-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"constructor-word":{pattern:/(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,lookbehind:!0,alias:"keyword"},"other-builtin-syntax":{pattern:null,lookbehind:!0,alias:"operator"},"conventionally-named-word":{pattern:/(^|\s)(?!")(?:(?:change|new|set|with)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,lookbehind:!0,alias:"keyword"},"colon-syntax":{pattern:/(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"function"},"semicolon-or-setlocal":{pattern:/(\s)(?:;|:>)(?=\s|$)/,lookbehind:!0,alias:"function"},"curly-brace-literal-delimiter":[{pattern:/(^|\s)[a-z]*\{(?=\s)/i,lookbehind:!0,alias:"operator"},{pattern:/(\s)\}(?=\s|$)/,lookbehind:!0,alias:"operator"}],"quotation-delimiter":[{pattern:/(^|\s)\[(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\](?=\s|$)/,lookbehind:!0,alias:"operator"}],"normal-word":{pattern:/(^|\s)[^"\s]\S*(?=\s|$)/,lookbehind:!0},string:{pattern:/"(?:\\\S|[^"\\])*"/,greedy:!0,inside:s}},o=function(h){return(h+"").replace(/([.?*+\^$\[\]\\(){}|\-])/g,"\\$1")},u=function(h){return new RegExp("(^|\\s)(?:"+h.map(o).join("|")+")(?=\\s|$)")},c={"kernel-builtin":["or","2nipd","4drop","tuck","wrapper","nip","wrapper?","callstack>array","die","dupd","callstack","callstack?","3dup","hashcode","pick","4nip","build",">boolean","nipd","clone","5nip","eq?","?","=","swapd","2over","clear","2dup","get-retainstack","not","tuple?","dup","3nipd","call","-rotd","object","drop","assert=","assert?","-rot","execute","boa","get-callstack","curried?","3drop","pickd","overd","over","roll","3nip","swap","and","2nip","rotd","throw","(clone)","hashcode*","spin","reach","4dup","equal?","get-datastack","assert","2drop","<wrapper>","boolean?","identity-hashcode","identity-tuple?","null","composed?","new","5drop","rot","-roll","xor","identity-tuple","boolean"],"other-builtin-syntax":["=======","recursive","flushable",">>","<<<<<<","M\\","B","PRIVATE>","\\","======","final","inline","delimiter","deprecated","<PRIVATE",">>>>>>","<<<<<<<","parse-complex","malformed-complex","read-only",">>>>>>>","call-next-method","<<","foldable","$","$[","${"],"sequences-builtin":["member-eq?","mismatch","append","assert-sequence=","longer","repetition","clone-like","3sequence","assert-sequence?","last-index-from","reversed","index-from","cut*","pad-tail","join-as","remove-eq!","concat-as","but-last","snip","nths","nth","sequence","longest","slice?","<slice>","remove-nth","tail-slice","empty?","tail*","member?","virtual-sequence?","set-length","drop-prefix","iota","unclip","bounds-error?","unclip-last-slice","non-negative-integer-expected","non-negative-integer-expected?","midpoint@","longer?","?set-nth","?first","rest-slice","prepend-as","prepend","fourth","sift","subseq-start","new-sequence","?last","like","first4","1sequence","reverse","slice","virtual@","repetition?","set-last","index","4sequence","max-length","set-second","immutable-sequence","first2","first3","supremum","unclip-slice","suffix!","insert-nth","tail","3append","short","suffix","concat","flip","immutable?","reverse!","2sequence","sum","delete-all","indices","snip-slice","<iota>","check-slice","sequence?","head","append-as","halves","sequence=","collapse-slice","?second","slice-error?","product","bounds-check?","bounds-check","immutable","virtual-exemplar","harvest","remove","pad-head","last","set-fourth","cartesian-product","remove-eq","shorten","shorter","reversed?","shorter?","shortest","head-slice","pop*","tail-slice*","but-last-slice","iota?","append!","cut-slice","new-resizable","head-slice*","sequence-hashcode","pop","set-nth","?nth","second","join","immutable-sequence?","<reversed>","3append-as","virtual-sequence","subseq?","remove-nth!","length","last-index","lengthen","assert-sequence","copy","move","third","first","tail?","set-first","prefix","bounds-error","<repetition>","exchange","surround","cut","min-length","set-third","push-all","head?","subseq-start-from","delete-slice","rest","sum-lengths","head*","infimum","remove!","glue","slice-error","subseq","push","replace-slice","subseq-as","unclip-last"],"math-builtin":["number=","next-power-of-2","?1+","fp-special?","imaginary-part","float>bits","number?","fp-infinity?","bignum?","fp-snan?","denominator","gcd","*","+","fp-bitwise=","-","u>=","/",">=","bitand","power-of-2?","log2-expects-positive","neg?","<","log2",">","integer?","number","bits>double","2/","zero?","bits>float","float?","shift","ratio?","rect>","even?","ratio","fp-sign","bitnot",">fixnum","complex?","/i","integer>fixnum","/f","sgn",">bignum","next-float","u<","u>","mod","recip","rational",">float","2^","integer","fixnum?","neg","fixnum","sq","bignum",">rect","bit?","fp-qnan?","simple-gcd","complex","<fp-nan>","real",">fraction","double>bits","bitor","rem","fp-nan-payload","real-part","log2-expects-positive?","prev-float","align","unordered?","float","fp-nan?","abs","bitxor","integer>fixnum-strict","u<=","odd?","<=","/mod",">integer","real?","rational?","numerator"]};Object.keys(c).forEach(function(h){a[h].pattern=u(c[h])});var d=["2bi","while","2tri","bi*","4dip","both?","same?","tri@","curry","prepose","3bi","?if","tri*","2keep","3keep","curried","2keepd","when","2bi*","2tri*","4keep","bi@","keepdd","do","unless*","tri-curry","if*","loop","bi-curry*","when*","2bi@","2tri@","with","2with","either?","bi","until","3dip","3curry","tri-curry*","tri-curry@","bi-curry","keepd","compose","2dip","if","3tri","unless","tuple","keep","2curry","tri","most","while*","dip","composed","bi-curry@","find-last-from","trim-head-slice","map-as","each-from","none?","trim-tail","partition","if-empty","accumulate*","reject!","find-from","accumulate-as","collector-for-as","reject","map","map-sum","accumulate!","2each-from","follow","supremum-by","map!","unless-empty","collector","padding","reduce-index","replicate-as","infimum-by","trim-tail-slice","count","find-index","filter","accumulate*!","reject-as","map-integers","map-find","reduce","selector","interleave","2map","filter-as","binary-reduce","map-index-as","find","produce","filter!","replicate","cartesian-map","cartesian-each","find-index-from","map-find-last","3map-as","3map","find-last","selector-as","2map-as","2map-reduce","accumulate","each","each-index","accumulate*-as","when-empty","all?","collector-as","push-either","new-like","collector-for","2selector","push-if","2all?","map-reduce","3each","any?","trim-slice","2reduce","change-nth","produce-as","2each","trim","trim-head","cartesian-find","map-index","if-zero","each-integer","unless-zero","(find-integer)","when-zero","find-last-integer","(all-integers?)","times","(each-integer)","find-integer","all-integers?","unless-negative","if-positive","when-positive","when-negative","unless-positive","if-negative","case","2cleave","cond>quot","case>quot","3cleave","wrong-values","to-fixed-point","alist>quot","cond","cleave","call-effect","recursive-hashcode","spread","deep-spread>quot","2||","0||","n||","0&&","2&&","3||","1||","1&&","n&&","3&&","smart-unless*","keep-inputs","reduce-outputs","smart-when*","cleave>array","smart-with","smart-apply","smart-if","inputs/outputs","output>sequence-n","map-outputs","map-reduce-outputs","dropping","output>array","smart-map-reduce","smart-2map-reduce","output>array-n","nullary","input<sequence","append-outputs","drop-inputs","inputs","smart-2reduce","drop-outputs","smart-reduce","preserving","smart-when","outputs","append-outputs-as","smart-unless","smart-if*","sum-outputs","input<sequence-unsafe","output>sequence"];a.combinators.pattern=u(d),t.languages.factor=a})(e)}L1.displayName="false";L1.aliases=[];function L1(e){(function(t){t.languages.false={comment:{pattern:/\{[^}]*\}/},string:{pattern:/"[^"]*"/,greedy:!0},"character-code":{pattern:/'(?:[^\r]|\r\n?)/,alias:"number"},"assembler-code":{pattern:/\d+`/,alias:"important"},number:/\d+/,operator:/[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/,punctuation:/\[|\]/,variable:/[a-z]/,"non-standard":{pattern:/[()<BDO®]/,alias:"bold"}}})(e)}M1.displayName="firestore-security-rules";M1.aliases=[];function M1(e){e.register(zt),e.languages["firestore-security-rules"]=e.languages.extend("clike",{comment:/\/\/.*/,keyword:/\b(?:allow|function|if|match|null|return|rules_version|service)\b/,operator:/&&|\|\||[<>!=]=?|[-+*/%]|\b(?:in|is)\b/}),delete e.languages["firestore-security-rules"]["class-name"],e.languages.insertBefore("firestore-security-rules","keyword",{path:{pattern:/(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/,inside:{operator:/=/,keyword:/\*\*/,punctuation:/[.$(){}]/}},punctuation:/\//}},method:{pattern:/(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,lookbehind:!0,alias:"builtin",inside:{punctuation:/,/}}})}F1.displayName="flow";F1.aliases=[];function F1(e){e.register(yr),(function(t){t.languages.flow=t.languages.extend("javascript",{}),t.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),t.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete t.languages.flow.parameter,t.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(t.languages.flow.keyword)||(t.languages.flow.keyword=[t.languages.flow.keyword]),t.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})})(e)}P1.displayName="fortran";P1.aliases=[];function P1(e){e.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:FALSE|TRUE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}}B1.displayName="ftl";B1.aliases=[];function B1(e){e.register(Er),(function(t){for(var n=/[^<()"']|\((?:<expr>)*\)|<(?!#--)|<#--(?:[^-]|-(?!->))*-->|"(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'/.source,s=0;s<2;s++)n=n.replace(/<expr>/g,function(){return n});n=n.replace(/<expr>/g,/[^\s\S]/.source);var a={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp(/("|')(?:(?!\1|\$\{)[^\\]|\\.|\$\{(?:(?!\})(?:<expr>))*\})*\1/.source.replace(/<expr>/g,function(){return n})),greedy:!0,inside:{interpolation:{pattern:RegExp(/((?:^|[^\\])(?:\\\\)*)\$\{(?:(?!\})(?:<expr>))*\}/.source.replace(/<expr>/g,function(){return n})),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\b\w+(?=\s*\()/,number:/\b\d+(?:\.\d+)?\b/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};a.string[1].inside.interpolation.inside.rest=a,t.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:a}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:a}}}},t.hooks.add("before-tokenize",function(o){var u=RegExp(/<#--[\s\S]*?-->|<\/?[#@][a-zA-Z](?:<expr>)*?>|\$\{(?:<expr>)*?\}/.source.replace(/<expr>/g,function(){return n}),"gi");t.languages["markup-templating"].buildPlaceholders(o,"ftl",u)}),t.hooks.add("after-tokenize",function(o){t.languages["markup-templating"].tokenizePlaceholders(o,"ftl")})})(e)}U1.displayName="gml";U1.aliases=["gamemakerlanguage"];function U1(e){e.register(zt),e.languages.gamemakerlanguage=e.languages.gml=e.languages.extend("clike",{keyword:/\b(?:break|case|continue|default|do|else|enum|exit|for|globalvar|if|repeat|return|switch|until|var|while)\b/,number:/(?:\b0x[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ulf]{0,4}/i,operator:/--|\+\+|[-+%/=]=?|!=|\*\*?=?|<[<=>]?|>[=>]?|&&?|\^\^?|\|\|?|~|\b(?:and|at|not|or|with|xor)\b/,constant:/\b(?:GM_build_date|GM_version|action_(?:continue|restart|reverse|stop)|all|gamespeed_(?:fps|microseconds)|global|local|noone|other|pi|pointer_(?:invalid|null)|self|timezone_(?:local|utc)|undefined|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|post|pre)|keypress|keyrelease|trigger|(?:left|middle|no|right)_button|(?:left|middle|right)_press|(?:left|middle|right)_release|mouse_(?:enter|leave|wheel_down|wheel_up)|global_(?:left|middle|right)_button|global_(?:left|middle|right)_press|global_(?:left|middle|right)_release|joystick(?:1|2)_(?:button1|button2|button3|button4|button5|button6|button7|button8|down|left|right|up)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|gui|gui_begin|gui_end|step_(?:begin|end|normal))|vk_(?:alt|anykey|backspace|control|delete|down|end|enter|escape|home|insert|left|nokey|pagedown|pageup|pause|printscreen|return|right|shift|space|tab|up|f\d|numpad\d|add|decimal|divide|lalt|lcontrol|lshift|multiply|ralt|rcontrol|rshift|subtract)|achievement_(?:filter_(?:all_players|favorites_only|friends_only)|friends_info|info|leaderboard_info|our_info|pic_loaded|show_(?:achievement|bank|friend_picker|leaderboard|profile|purchase_prompt|ui)|type_challenge|type_score_challenge)|asset_(?:font|object|path|room|script|shader|sound|sprite|tiles|timeline|unknown)|audio_(?:3d|falloff_(?:exponent_distance|exponent_distance_clamped|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|none)|mono|new_system|old_system|stereo)|bm_(?:add|complex|dest_alpha|dest_color|dest_colour|inv_dest_alpha|inv_dest_color|inv_dest_colour|inv_src_alpha|inv_src_color|inv_src_colour|max|normal|one|src_alpha|src_alpha_sat|src_color|src_colour|subtract|zero)|browser_(?:chrome|firefox|ie|ie_mobile|not_a_browser|opera|safari|safari_mobile|tizen|unknown|windows_store)|buffer_(?:bool|f16|f32|f64|fast|fixed|generalerror|grow|invalidtype|network|outofbounds|outofspace|s16|s32|s8|seek_end|seek_relative|seek_start|string|text|u16|u32|u64|u8|vbuffer|wrap)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)|cmpfunc_(?:always|equal|greater|greaterequal|less|lessequal|never|notequal)|cr_(?:appstart|arrow|beam|cross|default|drag|handpoint|hourglass|none|size_all|size_nesw|size_ns|size_nwse|size_we|uparrow)|cull_(?:clockwise|counterclockwise|noculling)|device_(?:emulator|tablet)|device_ios_(?:ipad|ipad_retina|iphone|iphone5|iphone6|iphone6plus|iphone_retina|unknown)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|dll_(?:cdecl|cdel|stdcall)|ds_type_(?:grid|list|map|priority|queue|stack)|ef_(?:cloud|ellipse|explosion|firework|flare|rain|ring|smoke|smokeup|snow|spark|star)|fa_(?:archive|bottom|center|directory|hidden|left|middle|readonly|right|sysfile|top|volumeid)|fb_login_(?:default|fallback_to_webview|forcing_safari|forcing_webview|no_fallback_to_webview|use_system_account)|iap_(?:available|canceled|ev_consume|ev_product|ev_purchase|ev_restore|ev_storeload|failed|purchased|refunded|status_available|status_loading|status_processing|status_restoring|status_unavailable|status_uninitialised|storeload_failed|storeload_ok|unavailable)|leaderboard_type_(?:number|time_mins_secs)|lighttype_(?:dir|point)|matrix_(?:projection|view|world)|mb_(?:any|left|middle|none|right)|network_(?:config_(?:connect_timeout|disable_reliable_udp|enable_reliable_udp|use_non_blocking_socket)|socket_(?:bluetooth|tcp|udp)|type_(?:connect|data|disconnect|non_blocking_connect))|of_challenge_(?:lose|tie|win)|os_(?:android|ios|linux|macosx|ps3|ps4|psvita|unknown|uwp|win32|win8native|windows|winphone|xboxone)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|angle|angle_limits|damping_ratio|frequency|length_1|length_2|lower_angle_limit|max_force|max_length|max_motor_force|max_motor_torque|max_torque|motor_force|motor_speed|motor_torque|reaction_force_x|reaction_force_y|reaction_torque|speed|translation|upper_angle_limit)|phy_particle_data_flag_(?:category|color|colour|position|typeflags|velocity)|phy_particle_flag_(?:colormixing|colourmixing|elastic|powder|spring|tensile|viscous|wall|water|zombie)|phy_particle_group_flag_(?:rigid|solid)|pr_(?:linelist|linestrip|pointlist|trianglefan|trianglelist|trianglestrip)|ps_(?:distr|shape)_(?:diamond|ellipse|gaussian|invgaussian|line|linear|rectangle)|pt_shape_(?:circle|cloud|disk|explosion|flare|line|pixel|ring|smoke|snow|spark|sphere|square|star)|ty_(?:real|string)|gp_(?:face\d|axislh|axislv|axisrh|axisrv|padd|padl|padr|padu|select|shoulderl|shoulderlb|shoulderr|shoulderrb|start|stickl|stickr)|lb_disp_(?:none|numeric|time_ms|time_sec)|lb_sort_(?:ascending|descending|none)|ov_(?:achievements|community|friends|gamegroup|players|settings)|ugc_(?:filetype_(?:community|microtrans)|list_(?:Favorited|Followed|Published|Subscribed|UsedOrPlayed|VotedDown|VotedOn|VotedUp|WillVoteLater)|match_(?:AllGuides|Artwork|Collections|ControllerBindings|IntegratedGuides|Items|Items_Mtx|Items_ReadyToUse|Screenshots|UsableInGame|Videos|WebGuides)|query_(?:AcceptedForGameRankedByAcceptanceDate|CreatedByFriendsRankedByPublicationDate|FavoritedByFriendsRankedByPublicationDate|NotYetRated)|query_RankedBy(?:NumTimesReported|PublicationDate|TextSearch|TotalVotesAsc|Trend|Vote|VotesUp)|result_success|sortorder_CreationOrder(?:Asc|Desc)|sortorder_(?:ForModeration|LastUpdatedDesc|SubscriptionDateDesc|TitleAsc|VoteScoreDesc)|visibility_(?:friends_only|private|public))|vertex_usage_(?:binormal|blendindices|blendweight|color|colour|depth|fog|normal|position|psize|sample|tangent|texcoord|textcoord)|vertex_type_(?:float\d|color|colour|ubyte4)|input_type|layerelementtype_(?:background|instance|oldtilemap|particlesystem|sprite|tile|tilemap|undefined)|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|tile_(?:flip|index_mask|mirror|rotate)|(?:obj|rm|scr|spr)\w+)\b/,variable:/\b(?:alarm|application_surface|async_load|background_(?:alpha|blend|color|colour|foreground|height|hspeed|htiled|index|showcolor|showcolour|visible|vspeed|vtiled|width|x|xscale|y|yscale)|bbox_(?:bottom|left|right|top)|browser_(?:height|width)|caption_(?:health|lives|score)|current_(?:day|hour|minute|month|second|time|weekday|year)|cursor_sprite|debug_mode|delta_time|direction|display_aa|error_(?:last|occurred)|event_(?:action|number|object|type)|fps|fps_real|friction|game_(?:display|project|save)_(?:id|name)|gamemaker_(?:pro|registered|version)|gravity|gravity_direction|(?:h|v)speed|health|iap_data|id|image_(?:alpha|angle|blend|depth|index|number|speed|xscale|yscale)|instance_(?:count|id)|keyboard_(?:key|lastchar|lastkey|string)|layer|lives|mask_index|mouse_(?:button|lastbutton|x|y)|object_index|os_(?:browser|device|type|version)|path_(?:endaction|index|orientation|position|positionprevious|scale|speed)|persistent|phy_(?:rotation|(?:col_normal|collision|com|linear_velocity|position|speed)_(?:x|y)|angular_(?:damping|velocity)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|pointer_(?:invalid|null)|room|room_(?:caption|first|height|last|persistent|speed|width)|score|secure_mode|show_(?:health|lives|score)|solid|speed|sprite_(?:height|index|width|xoffset|yoffset)|temp_directory|timeline_(?:index|loop|position|running|speed)|transition_(?:color|kind|steps)|undefined|view_(?:angle|current|enabled|(?:h|v)(?:border|speed)|(?:h|w|x|y)port|(?:h|w|x|y)view|object|surface_id|visible)|visible|webgl_enabled|working_directory|(?:x|y)(?:previous|start)|x|y|argument(?:_relitive|_count|\d)|argument|global|local|other|self)\b/})}H1.displayName="gap";H1.aliases=[];function H1(e){e.languages.gap={shell:{pattern:/^gap>[\s\S]*?(?=^gap>|$(?![\s\S]))/m,greedy:!0,inside:{gap:{pattern:/^(gap>).+(?:(?:\r(?:\n|(?!\n))|\n)>.*)*/,lookbehind:!0,inside:null},punctuation:/^gap>/}},comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(^|[^\\'"])(?:'(?:[^\r\n\\']|\\.){1,10}'|"(?:[^\r\n\\"]|\\.)*"(?!")|"""[\s\S]*?""")/,lookbehind:!0,greedy:!0,inside:{continuation:{pattern:/([\r\n])>/,lookbehind:!0,alias:"punctuation"}}},keyword:/\b(?:Assert|Info|IsBound|QUIT|TryNextMethod|Unbind|and|atomic|break|continue|do|elif|else|end|fi|for|function|if|in|local|mod|not|od|or|quit|readonly|readwrite|rec|repeat|return|then|until|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},continuation:{pattern:/([\r\n])>/,lookbehind:!0,alias:"punctuation"},operator:/->|[-+*/^~=!]|<>|[<>]=?|:=|\.\./,punctuation:/[()[\]{},;.:]/},e.languages.gap.shell.inside.gap.inside=e.languages.gap}$1.displayName="gcode";$1.aliases=[];function $1(e){e.languages.gcode={comment:/;.*|\B\(.*?\)\B/,string:{pattern:/"(?:""|[^"])*"/,greedy:!0},keyword:/\b[GM]\d+(?:\.\d+)?\b/,property:/\b[A-Z]/,checksum:{pattern:/(\*)\d+/,lookbehind:!0,alias:"number"},punctuation:/[:*]/}}z1.displayName="gdscript";z1.aliases=[];function z1(e){e.languages.gdscript={comment:/#.*/,string:{pattern:/@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,greedy:!0},"class-name":{pattern:/(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,lookbehind:!0},keyword:/\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,variable:/\$\w+/,number:[/\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/,/\b(?:INF|NAN|PI|TAU)\b/],constant:/\b[A-Z][A-Z_\d]*\b/,boolean:/\b(?:false|true)\b/,operator:/->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,punctuation:/[.:,;()[\]{}]/}}G1.displayName="gedcom";G1.aliases=[];function G1(e){e.languages.gedcom={"line-value":{pattern:/(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?\w+ ).+/m,lookbehind:!0,inside:{pointer:{pattern:/^@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@$/,alias:"variable"}}},record:{pattern:/(^[\t ]*\d+ +(?:@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@ +)?)\w+/m,lookbehind:!0,alias:"tag"},level:{pattern:/(^[\t ]*)\d+/m,lookbehind:!0,alias:"number"},pointer:{pattern:/@\w[\w!"$%&'()*+,\-./:;<=>?[\\\]^`{|}~\x80-\xfe #]*@/,alias:"variable"}}}q1.displayName="gettext";q1.aliases=["po"];function q1(e){e.languages.gettext={comment:[{pattern:/# .*/,greedy:!0,alias:"translator-comment"},{pattern:/#\..*/,greedy:!0,alias:"extracted-comment"},{pattern:/#:.*/,greedy:!0,alias:"reference-comment"},{pattern:/#,.*/,greedy:!0,alias:"flag-comment"},{pattern:/#\|.*/,greedy:!0,alias:"previously-untranslated-comment"},{pattern:/#.*/,greedy:!0}],string:{pattern:/(^|[^\\])"(?:[^"\\]|\\.)*"/,lookbehind:!0,greedy:!0},keyword:/^msg(?:ctxt|id|id_plural|str)\b/m,number:/\b\d+\b/,punctuation:/[\[\]]/},e.languages.po=e.languages.gettext}W1.displayName="gherkin";W1.aliases=[];function W1(e){(function(t){var n=/(?:\r?\n|\r)[ \t]*\|.+\|(?:(?!\|).)*/.source;t.languages.gherkin={pystring:{pattern:/("""|''')[\s\S]+?\1/,alias:"string"},comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},tag:{pattern:/(^[ \t]*)@\S*/m,lookbehind:!0},feature:{pattern:/((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|Lastnost|Mak|Mogucnost|laH|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|Potrzeba biznesowa|perbogh|poQbogh malja'|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]+/,lookbehind:!0},keyword:/[^:\r\n]+:/}},scenario:{pattern:/(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram Senaryo|Dyagram senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|EXAMPLZ|Examples|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|Grundlage|Hannergrond|ghantoH|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut chovnatlh|lut|lutmey|Lýsing Atburðarásar|Lýsing Dæma|MISHUN SRSLY|MISHUN|Menggariskan Senario|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan Senaryo|Plan senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo Deskripsyon|Senaryo deskripsyon|Senaryo|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie Uiteensetting|Situasie|Skenario konsep|Skenario|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa hwaer swa|Swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]*/,lookbehind:!0},keyword:/[^:\r\n]+:/}},"table-body":{pattern:RegExp("("+n+")(?:"+n+")+"),lookbehind:!0,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"},td:{pattern:/\s*[^\s|][^|]*/,alias:"string"},punctuation:/\|/}},"table-head":{pattern:RegExp(n),inside:{th:{pattern:/\s*[^\s|][^|]*/,alias:"variable"},punctuation:/\|/}},atrule:{pattern:/(^[ \t]+)(?:'a|'ach|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cand|Cando|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|DEN|Dato|De|Den youse gotta|Dengan|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|E|En|Entonces|Epi|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kad|Kada|Kadar|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Ma|Majd|Maka|Manawa|Mas|Men|Menawa|Mutta|Nalika|Nalikaning|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Och|Og|Oletetaan|Ond|Onda|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|Quan|Quand|Quando|qaSDI'|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|Un|Und|ugeholl|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadan|Zadani|Zadano|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"}}},outline:{pattern:/<[^>]+>/,alias:"variable"}}})(e)}V1.displayName="git";V1.aliases=[];function V1(e){e.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}}Y1.displayName="glsl";Y1.aliases=[];function Y1(e){e.register(zs),e.languages.glsl=e.languages.extend("c",{keyword:/\b(?:active|asm|atomic_uint|attribute|[ibdu]?vec[234]|bool|break|buffer|case|cast|centroid|class|coherent|common|const|continue|d?mat[234](?:x[234])?|default|discard|do|double|else|enum|extern|external|false|filter|fixed|flat|float|for|fvec[234]|goto|half|highp|hvec[234]|[iu]?sampler2DMS(?:Array)?|[iu]?sampler2DRect|[iu]?samplerBuffer|[iu]?samplerCube|[iu]?samplerCubeArray|[iu]?sampler[123]D|[iu]?sampler[12]DArray|[iu]?image2DMS(?:Array)?|[iu]?image2DRect|[iu]?imageBuffer|[iu]?imageCube|[iu]?imageCubeArray|[iu]?image[123]D|[iu]?image[12]DArray|if|in|inline|inout|input|int|interface|invariant|layout|long|lowp|mediump|namespace|noinline|noperspective|out|output|partition|patch|precise|precision|public|readonly|resource|restrict|return|sample|sampler[12]DArrayShadow|sampler[12]DShadow|sampler2DRectShadow|sampler3DRect|samplerCubeArrayShadow|samplerCubeShadow|shared|short|sizeof|smooth|static|struct|subroutine|superp|switch|template|this|true|typedef|uint|uniform|union|unsigned|using|varying|void|volatile|while|writeonly)\b/})}K1.displayName="gn";K1.aliases=["gni"];function K1(e){e.languages.gn={comment:{pattern:/#.*/,greedy:!0},"string-literal":{pattern:/(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/,lookbehind:!0,inside:{number:/^\$0x[\s\S]{2}$/,variable:/^\$\w+$/,"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},string:/[\s\S]+/}},keyword:/\b(?:else|if)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i,alias:"keyword"},function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_os|target_out_dir)\b/,number:/-?\b\d+\b/,operator:/[-+!=<>]=?|&&|\|\|/,punctuation:/[(){}[\],.]/},e.languages.gn["string-literal"].inside.interpolation.inside.expression.inside=e.languages.gn,e.languages.gni=e.languages.gn}X1.displayName="linker-script";X1.aliases=["ld"];function X1(e){e.languages["linker-script"]={comment:{pattern:/(^|\s)\/\*[\s\S]*?(?:$|\*\/)/,lookbehind:!0,greedy:!0},identifier:{pattern:/"[^"\r\n]*"/,greedy:!0},"location-counter":{pattern:/\B\.\B/,alias:"important"},section:{pattern:/(^|[^\w*])\.\w+\b/,lookbehind:!0,alias:"keyword"},function:/\b[A-Z][A-Z_]*(?=\s*\()/,number:/\b(?:0[xX][a-fA-F0-9]+|\d+)[KM]?\b/,operator:/>>=?|<<=?|->|\+\+|--|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?/,punctuation:/[(){},;]/},e.languages.ld=e.languages["linker-script"]}Z1.displayName="go-module";Z1.aliases=["go-mod"];function Z1(e){e.languages["go-mod"]=e.languages["go-module"]={comment:{pattern:/\/\/.*/,greedy:!0},version:{pattern:/(^|[\s()[\],])v\d+\.\d+\.\d+(?:[+-][-+.\w]*)?(?![^\s()[\],])/,lookbehind:!0,alias:"number"},"go-version":{pattern:/((?:^|\s)go\s+)\d+(?:\.\d+){1,2}/,lookbehind:!0,alias:"number"},keyword:{pattern:/^([ \t]*)(?:exclude|go|module|replace|require|retract)\b/m,lookbehind:!0},operator:/=>/,punctuation:/[()[\],]/}}Q1.displayName="gradle";Q1.aliases=[];function Q1(e){e.register(zt),(function(t){var n={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};t.languages.gradle=t.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:apply|def|dependencies|else|if|implementation|import|plugin|plugins|project|repositories|repository|sourceSets|tasks|val)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),t.languages.insertBefore("gradle","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}}}),t.languages.insertBefore("gradle","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),t.languages.insertBefore("gradle","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),n.inside.expression.inside=t.languages.gradle})(e)}J1.displayName="graphql";J1.aliases=[];function J1(e){e.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:e.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},e.hooks.add("after-tokenize",function(n){if(n.language!=="graphql")return;var s=n.tokens.filter(function(b){return typeof b!="string"&&b.type!=="comment"&&b.type!=="scalar"}),a=0;function o(b){return s[a+b]}function u(b,y){y=y||0;for(var E=0;E<b.length;E++){var _=o(E+y);if(!_||_.type!==b[E])return!1}return!0}function c(b,y){for(var E=1,_=a;_<s.length;_++){var N=s[_],A=N.content;if(N.type==="punctuation"&&typeof A=="string"){if(b.test(A))E++;else if(y.test(A)&&(E--,E===0))return _}}return-1}function d(b,y){var E=b.alias;E?Array.isArray(E)||(b.alias=E=[E]):b.alias=E=[],E.push(y)}for(;a<s.length;){var h=s[a++];if(h.type==="keyword"&&h.content==="mutation"){var p=[];if(u(["definition-mutation","punctuation"])&&o(1).content==="("){a+=2;var m=c(/^\($/,/^\)$/);if(m===-1)continue;for(;a<m;a++){var g=o(0);g.type==="variable"&&(d(g,"variable-input"),p.push(g.content))}a=m+1}if(u(["punctuation","property-query"])&&o(0).content==="{"&&(a++,d(o(0),"property-mutation"),p.length>0)){var v=c(/^\{$/,/^\}$/);if(v===-1)continue;for(var C=a;C<v;C++){var S=s[C];S.type==="variable"&&p.indexOf(S.content)>=0&&d(S,"variable-input")}}}}})}eS.displayName="groovy";eS.aliases=[];function eS(e){e.register(zt),(function(t){var n={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};t.languages.groovy=t.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),t.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:n,string:/[\s\S]+/}}}),t.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),t.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),n.inside.expression.inside=t.languages.groovy})(e)}tS.displayName="textile";tS.aliases=[];function tS(e){e.register(ur),(function(t){var n=/\([^|()\n]+\)|\[[^\]\n]+\]|\{[^}\n]+\}/.source,s=/\)|\((?![^|()\n]+\))/.source;function a(m,g){return RegExp(m.replace(/<MOD>/g,function(){return"(?:"+n+")"}).replace(/<PAR>/g,function(){return"(?:"+s+")"}),g||"")}var o={css:{pattern:/\{[^{}]+\}/,inside:{rest:t.languages.css}},"class-id":{pattern:/(\()[^()]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\[\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},u=t.languages.textile=t.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:a(/^[a-z]\w*(?:<MOD>|<PAR>|[<>=])*\./.source),inside:{modifier:{pattern:a(/(^[a-z]\w*)(?:<MOD>|<PAR>|[<>=])+(?=\.)/.source),lookbehind:!0,inside:o},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:a(/^[*#]+<MOD>*\s+\S.*/.source,"m"),inside:{modifier:{pattern:a(/(^[*#]+)<MOD>+/.source),lookbehind:!0,inside:o},punctuation:/^[*#]+/}},table:{pattern:a(/^(?:(?:<MOD>|<PAR>|[<>=^~])+\.\s*)?(?:\|(?:(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+\.|(?!(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+\.))[^|]*)+\|/.source,"m"),inside:{modifier:{pattern:a(/(^|\|(?:\r?\n|\r)?)(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+(?=\.)/.source),lookbehind:!0,inside:o},punctuation:/\||^\./}},inline:{pattern:a(/(^|[^a-zA-Z\d])(\*\*|__|\?\?|[*_%@+\-^~])<MOD>*.+?\2(?![a-zA-Z\d])/.source),lookbehind:!0,inside:{bold:{pattern:a(/(^(\*\*?)<MOD>*).+?(?=\2)/.source),lookbehind:!0},italic:{pattern:a(/(^(__?)<MOD>*).+?(?=\2)/.source),lookbehind:!0},cite:{pattern:a(/(^\?\?<MOD>*).+?(?=\?\?)/.source),lookbehind:!0,alias:"string"},code:{pattern:a(/(^@<MOD>*).+?(?=@)/.source),lookbehind:!0,alias:"keyword"},inserted:{pattern:a(/(^\+<MOD>*).+?(?=\+)/.source),lookbehind:!0},deleted:{pattern:a(/(^-<MOD>*).+?(?=-)/.source),lookbehind:!0},span:{pattern:a(/(^%<MOD>*).+?(?=%)/.source),lookbehind:!0},modifier:{pattern:a(/(^\*\*|__|\?\?|[*_%@+\-^~])<MOD>+/.source),lookbehind:!0,inside:o},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(^\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:a(/"<MOD>*[^"]+":.+?(?=[^\w/]?(?:\s|$))/.source),inside:{text:{pattern:a(/(^"<MOD>*)[^"]+(?=")/.source),lookbehind:!0},modifier:{pattern:a(/(^")<MOD>+/.source),lookbehind:!0,inside:o},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:a(/!(?:<MOD>|<PAR>|[<>=])*(?![<>=])[^!\s()]+(?:\([^)]+\))?!(?::.+?(?=[^\w/]?(?:\s|$)))?/.source),inside:{source:{pattern:a(/(^!(?:<MOD>|<PAR>|[<>=])*)(?![<>=])[^!\s()]+(?:\([^)]+\))?(?=!)/.source),lookbehind:!0,alias:"url"},modifier:{pattern:a(/(^!)(?:<MOD>|<PAR>|[<>=])+/.source),lookbehind:!0,inside:o},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^()]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:C|R|TM)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),c=u.phrase.inside,d={inline:c.inline,link:c.link,image:c.image,footnote:c.footnote,acronym:c.acronym,mark:c.mark};u.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var h=c.inline.inside;h.bold.inside=d,h.italic.inside=d,h.inserted.inside=d,h.deleted.inside=d,h.span.inside=d;var p=c.table.inside;p.inline=d.inline,p.link=d.link,p.image=d.image,p.footnote=d.footnote,p.acronym=d.acronym,p.mark=d.mark})(e)}nS.displayName="haml";nS.aliases=[];function nS(e){e.register(Mo),(function(t){t.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ].+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ].*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ].+)/,lookbehind:!0,inside:t.languages.ruby},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ].*\|[\t ]*)*/,lookbehind:!0,inside:t.languages.ruby}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:t.languages.markup},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/,lookbehind:!0,inside:t.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:t.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:t.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},ruby:{pattern:/[\s\S]+/,inside:t.languages.ruby}}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var n="((?:^|\\r?\\n|\\r)([\\t ]*)):{{filter_name}}(?:(?:\\r?\\n|\\r)(?:\\2[\\t ].+|\\s*?(?=\\r?\\n|\\r)))+",s=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],a={},o=0,u=s.length;o<u;o++){var c=s[o];c=typeof c=="string"?{filter:c,language:c}:c,t.languages[c.language]&&(a["filter-"+c.filter]={pattern:RegExp(n.replace("{{filter_name}}",function(){return c.filter})),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"symbol"},text:{pattern:/[\s\S]+/,alias:[c.language,"language-"+c.language],inside:t.languages[c.language]}}})}t.languages.insertBefore("haml","filter",a)})(e)}rS.displayName="handlebars";rS.aliases=["hbs","mustache"];function rS(e){e.register(Er),(function(t){t.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},t.hooks.add("before-tokenize",function(n){var s=/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g;t.languages["markup-templating"].buildPlaceholders(n,"handlebars",s)}),t.hooks.add("after-tokenize",function(n){t.languages["markup-templating"].tokenizePlaceholders(n,"handlebars")}),t.languages.hbs=t.languages.handlebars,t.languages.mustache=t.languages.handlebars})(e)}sh.displayName="haskell";sh.aliases=["hs"];function sh(e){e.languages.haskell={comment:{pattern:/(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--(?:(?=.)[^-!#$%*+=?&@|~.:<>^\\\/].*|$)|\{-[\s\S]*?-\})/m,lookbehind:!0},char:{pattern:/'(?:[^\\']|\\(?:[abfnrtv\\"'&]|\^[A-Z@[\]^_]|ACK|BEL|BS|CAN|CR|DC1|DC2|DC3|DC4|DEL|DLE|EM|ENQ|EOT|ESC|ETB|ETX|FF|FS|GS|HT|LF|NAK|NUL|RS|SI|SO|SOH|SP|STX|SUB|SYN|US|VT|\d+|o[0-7]+|x[0-9a-fA-F]+))'/,alias:"string"},string:{pattern:/"(?:[^\\"]|\\(?:\S|\s+\\))*"/,greedy:!0},keyword:/\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,"import-statement":{pattern:/(^[\t ]*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|hiding|import|qualified)\b/,punctuation:/\./}},builtin:/\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,operator:[{pattern:/`(?:[A-Z][\w']*\.)*[_a-z][\w']*`/,greedy:!0},{pattern:/(\s)\.(?=\s)/,lookbehind:!0},/[-!#$%*+=?&@|~:<>^\\\/][-!#$%*+=?&@|~.:<>^\\\/]*|\.[-!#$%*+=?&@|~.:<>^\\\/]+/],hvariable:{pattern:/\b(?:[A-Z][\w']*\.)*[_a-z][\w']*/,inside:{punctuation:/\./}},constant:{pattern:/\b(?:[A-Z][\w']*\.)*[A-Z][\w']*/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:]/},e.languages.hs=e.languages.haskell}sS.displayName="haxe";sS.aliases=[];function sS(e){e.register(zt),e.languages.haxe=e.languages.extend("clike",{string:{pattern:/"(?:[^"\\]|\\[\s\S])*"/,greedy:!0},"class-name":[{pattern:/(\b(?:abstract|class|enum|extends|implements|interface|new|typedef)\s+)[A-Z_]\w*/,lookbehind:!0},/\b[A-Z]\w*/],keyword:/\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|final|for|from|function|if|implements|import|in|inline|interface|macro|new|null|operator|overload|override|package|private|public|return|static|super|switch|throw|to|try|typedef|untyped|using|var|while)(?!\.)\b/,function:{pattern:/\b[a-z_]\w*(?=\s*(?:<[^<>]*>\s*)?\()/i,greedy:!0},operator:/\.{3}|\+\+|--|&&|\|\||->|=>|(?:<<?|>{1,3}|[-+*/%!=&|^])=?|[?:~]/}),e.languages.insertBefore("haxe","string",{"string-interpolation":{pattern:/'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{interpolation:{pattern:/(^|[^\\])\$(?:\w+|\{[^{}]+\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.haxe}}},string:/[\s\S]+/}}}),e.languages.insertBefore("haxe","class-name",{regex:{pattern:/~\/(?:[^\/\\\r\n]|\\.)+\/[a-z]*/,greedy:!0,inside:{"regex-flags":/\b[a-z]+$/,"regex-source":{pattern:/^(~\/)[\s\S]+(?=\/$)/,lookbehind:!0,alias:"language-regex",inside:e.languages.regex},"regex-delimiter":/^~\/|\/$/}}}),e.languages.insertBefore("haxe","keyword",{preprocessor:{pattern:/#(?:else|elseif|end|if)\b.*/,alias:"property"},metadata:{pattern:/@:?[\w.]+/,alias:"symbol"},reification:{pattern:/\$(?:\w+|(?=\{))/,alias:"important"}})}aS.displayName="hcl";aS.aliases=[];function aS(e){e.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i,inside:{type:{pattern:/(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+\{)/],property:[/[-\w\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:count|data|local|module|path|self|terraform|var)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,boolean:/\b(?:false|true)\b/i,punctuation:/[=\[\]{}]/}}iS.displayName="hlsl";iS.aliases=[];function iS(e){e.register(zs),e.languages.hlsl=e.languages.extend("c",{"class-name":[e.languages.c["class-name"],/\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|RasterizerState|RenderTargetView|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/],keyword:[/\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/,/\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/],number:/(?:(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,boolean:/\b(?:false|true)\b/})}oS.displayName="hoon";oS.aliases=[];function oS(e){e.languages.hoon={comment:{pattern:/::.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'/,greedy:!0},constant:/%(?:\.[ny]|[\w-]+)/,"class-name":/@(?:[a-z0-9-]*[a-z0-9])?|\*/i,function:/(?:\+[-+] {2})?(?:[a-z](?:[a-z0-9-]*[a-z0-9])?)/,keyword:/\.[\^\+\*=\?]|![><:\.=\?!]|=[>|:,\.\-\^<+;/~\*\?]|\?[>|:\.\-\^<\+&~=@!]|\|[\$_%:\.\-\^~\*=@\?]|\+[|\$\+\*]|:[_\-\^\+~\*]|%[_:\.\-\^\+~\*=]|\^[|:\.\-\+&~\*=\?]|\$[|_%:<>\-\^&~@=\?]|;[:<\+;\/~\*=]|~[>|\$_%<\+\/&=\?!]|--|==/}}lS.displayName="hpkp";lS.aliases=[];function lS(e){e.languages.hpkp={directive:{pattern:/\b(?:includeSubDomains|max-age|pin-sha256|preload|report-to|report-uri|strict)(?=[\s;=]|$)/i,alias:"property"},operator:/=/,punctuation:/;/}}cS.displayName="hsts";cS.aliases=[];function cS(e){e.languages.hsts={directive:{pattern:/\b(?:includeSubDomains|max-age|preload)(?=[\s;=]|$)/i,alias:"property"},operator:/=/,punctuation:/;/}}uS.displayName="uri";uS.aliases=["url"];function uS(e){e.languages.uri={scheme:{pattern:/^[a-z][a-z0-9+.-]*:/im,greedy:!0,inside:{"scheme-delimiter":/:$/}},fragment:{pattern:/#[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"fragment-delimiter":/^#/}},query:{pattern:/\?[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"query-delimiter":{pattern:/^\?/,greedy:!0},"pair-delimiter":/[&;]/,pair:{pattern:/^[^=][\s\S]*/,inside:{key:/^[^=]+/,value:{pattern:/(^=)[\s\S]+/,lookbehind:!0}}}}},authority:{pattern:RegExp(/^\/\//.source+/(?:[\w\-.~!$&'()*+,;=%:]*@)?/.source+("(?:"+/\[(?:[0-9a-fA-F:.]{2,48}|v[0-9a-fA-F]+\.[\w\-.~!$&'()*+,;=]+)\]/.source+"|"+/[\w\-.~!$&'()*+,;=%]*/.source+")")+/(?::\d*)?/.source,"m"),inside:{"authority-delimiter":/^\/\//,"user-info-segment":{pattern:/^[\w\-.~!$&'()*+,;=%:]*@/,inside:{"user-info-delimiter":/@$/,"user-info":/^[\w\-.~!$&'()*+,;=%:]+/}},"port-segment":{pattern:/:\d*$/,inside:{"port-delimiter":/^:/,port:/^\d+/}},host:{pattern:/[\s\S]+/,inside:{"ip-literal":{pattern:/^\[[\s\S]+\]$/,inside:{"ip-literal-delimiter":/^\[|\]$/,"ipv-future":/^v[\s\S]+/,"ipv6-address":/^[\s\S]+/}},"ipv4-address":/^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]\d{0,2})$/}}}},path:{pattern:/^[\w\-.~!$&'()*+,;=%:@/]+/m,inside:{"path-separator":/\//}}},e.languages.url=e.languages.uri}dS.displayName="http";dS.aliases=[];function dS(e){(function(t){function n(p){return RegExp("(^(?:"+p+"):[ ]*(?![ ]))[^]+","i")}t.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:t.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},header:{pattern:/^[\w-]+:.+(?:(?:\r\n?|\n)[ \t].+)*/m,inside:{"header-value":[{pattern:n(/Content-Security-Policy/.source),lookbehind:!0,alias:["csp","languages-csp"],inside:t.languages.csp},{pattern:n(/Public-Key-Pins(?:-Report-Only)?/.source),lookbehind:!0,alias:["hpkp","languages-hpkp"],inside:t.languages.hpkp},{pattern:n(/Strict-Transport-Security/.source),lookbehind:!0,alias:["hsts","languages-hsts"],inside:t.languages.hsts},{pattern:n(/[^:]+/.source),lookbehind:!0}],"header-name":{pattern:/^[^:]+/,alias:"keyword"},punctuation:/^:/}}};var s=t.languages,a={"application/javascript":s.javascript,"application/json":s.json||s.javascript,"application/xml":s.xml,"text/xml":s.xml,"text/html":s.html,"text/css":s.css,"text/plain":s.plain},o={"application/json":!0,"application/xml":!0};function u(p){var m=p.replace(/^[a-z]+\//,""),g="\\w+/(?:[\\w.-]+\\+)+"+m+"(?![+\\w.-])";return"(?:"+p+"|"+g+")"}var c;for(var d in a)if(a[d]){c=c||{};var h=o[d]?u(d):d;c[d.replace(/\//g,"-")]={pattern:RegExp("("+/content-type:\s*/.source+h+/(?:(?:\r\n?|\n)[\w-].*)*(?:\r(?:\n|(?!\n))|\n)/.source+")"+/[^ \t\w-][\s\S]*/.source,"i"),lookbehind:!0,inside:a[d]}}c&&t.languages.insertBefore("http","header",c)})(e)}hS.displayName="ichigojam";hS.aliases=[];function hS(e){e.languages.ichigojam={comment:/(?:\B'|REM)(?:[^\n\r]*)/i,string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GOTO|GSB|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RIGHT|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i,function:/\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i,label:/(?:\B@\S+)/,operator:/<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i,punctuation:/[\[,;:()\]]/}}fS.displayName="icon";fS.aliases=[];function fS(e){e.languages.icon={comment:/#.*/,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n_]|\\.|_(?!\1)(?:\r\n|[\s\S]))*\1/,greedy:!0},number:/\b(?:\d+r[a-z\d]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b|\.\d+\b/i,"builtin-keyword":{pattern:/&(?:allocated|ascii|clock|collections|cset|current|date|dateline|digits|dump|e|error(?:number|text|value)?|errout|fail|features|file|host|input|lcase|letters|level|line|main|null|output|phi|pi|pos|progname|random|regions|source|storage|subject|time|trace|ucase|version)\b/,alias:"variable"},directive:{pattern:/\$\w+/,alias:"builtin"},keyword:/\b(?:break|by|case|create|default|do|else|end|every|fail|global|if|initial|invocable|link|local|next|not|of|procedure|record|repeat|return|static|suspend|then|to|until|while)\b/,function:/\b(?!\d)\w+(?=\s*[({]|\s*!\s*\[)/,operator:/[+-]:(?!=)|(?:[\/?@^%&]|\+\+?|--?|==?=?|~==?=?|\*\*?|\|\|\|?|<(?:->?|<?=?)|>>?=?)(?::=)?|:(?:=:?)?|[!.\\|~]/,punctuation:/[\[\](){},;]/}}pS.displayName="icu-message-format";pS.aliases=[];function pS(e){(function(t){function n(d,h){return h<=0?/[]/.source:d.replace(/<SELF>/g,function(){return n(d,h-1)})}var s=/'[{}:=,](?:[^']|'')*'(?!')/,a={pattern:/''/,greedy:!0,alias:"operator"},o={pattern:s,greedy:!0,inside:{escape:a}},u=n(/\{(?:[^{}']|'(?![{},'])|''|<STR>|<SELF>)*\}/.source.replace(/<STR>/g,function(){return s.source}),8),c={pattern:RegExp(u),inside:{message:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:null},"message-delimiter":{pattern:/./,alias:"punctuation"}}};t.languages["icu-message-format"]={argument:{pattern:RegExp(u),greedy:!0,inside:{content:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:{"argument-name":{pattern:/^(\s*)[^{}:=,\s]+/,lookbehind:!0},"choice-style":{pattern:/^(\s*,\s*choice\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{punctuation:/\|/,range:{pattern:/^(\s*)[+-]?(?:\d+(?:\.\d*)?|\u221e)\s*[<#\u2264]/,lookbehind:!0,inside:{operator:/[<#\u2264]/,number:/\S+/}},rest:null}},"plural-style":{pattern:/^(\s*,\s*(?:plural|selectordinal)\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{offset:/^offset:\s*\d+/,"nested-message":c,selector:{pattern:/=\d+|[^{}:=,\s]+/,inside:{keyword:/^(?:few|many|one|other|two|zero)$/}}}},"select-style":{pattern:/^(\s*,\s*select\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{"nested-message":c,selector:{pattern:/[^{}:=,\s]+/,inside:{keyword:/^other$/}}}},keyword:/\b(?:choice|plural|select|selectordinal)\b/,"arg-type":{pattern:/\b(?:date|duration|number|ordinal|spellout|time)\b/,alias:"keyword"},"arg-skeleton":{pattern:/(,\s*)::[^{}:=,\s]+/,lookbehind:!0},"arg-style":{pattern:/(,\s*)(?:currency|full|integer|long|medium|percent|short)(?=\s*$)/,lookbehind:!0},"arg-style-text":{pattern:RegExp(/(^\s*,\s*(?=\S))/.source+n(/(?:[^{}']|'[^']*'|\{(?:<SELF>)?\})+/.source,8)+"$"),lookbehind:!0,alias:"string"},punctuation:/,/}},"argument-delimiter":{pattern:/./,alias:"operator"}}},escape:a,string:o},c.inside.message.inside=t.languages["icu-message-format"],t.languages["icu-message-format"].argument.inside.content.inside["choice-style"].inside.rest=t.languages["icu-message-format"]})(e)}mS.displayName="idris";mS.aliases=["idr"];function mS(e){e.register(sh),e.languages.idris=e.languages.extend("haskell",{comment:{pattern:/(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m},keyword:/\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,builtin:void 0}),e.languages.insertBefore("idris","keyword",{"import-statement":{pattern:/(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.idr=e.languages.idris}gS.displayName="ignore";gS.aliases=["gitignore","hgignore","npmignore"];function gS(e){(function(t){t.languages.ignore={comment:/^#.*/m,entry:{pattern:/\S(?:.*(?:(?:\\ )|\S))?/,alias:"string",inside:{operator:/^!|\*\*?|\?/,regex:{pattern:/(^|[^\\])\[[^\[\]]*\]/,lookbehind:!0},punctuation:/\//}}},t.languages.gitignore=t.languages.ignore,t.languages.hgignore=t.languages.ignore,t.languages.npmignore=t.languages.ignore})(e)}bS.displayName="inform7";bS.aliases=[];function bS(e){e.languages.inform7={string:{pattern:/"[^"]*"/,inside:{substitution:{pattern:/\[[^\[\]]+\]/,inside:{delimiter:{pattern:/\[|\]/,alias:"punctuation"}}}}},comment:{pattern:/\[[^\[\]]+\]/,greedy:!0},title:{pattern:/^[ \t]*(?:book|chapter|part(?! of)|section|table|volume)\b.+/im,alias:"important"},number:{pattern:/(^|[^-])(?:\b\d+(?:\.\d+)?(?:\^\d+)?(?:(?!\d)\w+)?|\b(?:eight|eleven|five|four|nine|one|seven|six|ten|three|twelve|two))\b(?!-)/i,lookbehind:!0},verb:{pattern:/(^|[^-])\b(?:answering|applying to|are|asking|attacking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:ing|s)?|consulting|contain(?:ing|s)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:s|ve|ving)|hold(?:ing|s)?|impl(?:ies|y)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:ing|s)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:ing|s)?|setting|showing|singing|sleeping|smelling|squeezing|support(?:ing|s)?|swearing|switching|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:ing|s)?|var(?:ies|y|ying)|waiting|waking|waving|wear(?:ing|s)?)\b(?!-)/i,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|the story|unless)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i,lookbehind:!0},property:{pattern:/(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: off| on)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i,lookbehind:!0,alias:"symbol"},position:{pattern:/(^|[^-])\b(?:above|adjacent to|back side of|below|between|down|east|everywhere|front side|here|in|inside(?: from)?|north(?:east|west)?|nowhere|on(?: top of)?|other side|outside(?: from)?|parts? of|regionally in|south(?:east|west)?|through|up|west|within)\b(?!-)/i,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|[^-])\b(?:actions?|activit(?:ies|y)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i,lookbehind:!0,alias:"variable"},punctuation:/[.,:;(){}]/},e.languages.inform7.string.inside.substitution.inside.rest=e.languages.inform7,e.languages.inform7.string.inside.substitution.inside.rest.text={pattern:/\S(?:\s*\S)*/,alias:"comment"}}xS.displayName="io";xS.aliases=[];function xS(e){e.languages.io={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\/\/.*|#.*)/,lookbehind:!0,greedy:!0},"triple-quoted-string":{pattern:/"""(?:\\[\s\S]|(?!""")[^\\])*"""/,greedy:!0,alias:"string"},string:{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},keyword:/\b(?:activate|activeCoroCount|asString|block|break|call|catch|clone|collectGarbage|compileString|continue|do|doFile|doMessage|doString|else|elseif|exit|for|foreach|forward|getEnvironmentVariable|getSlot|hasSlot|if|ifFalse|ifNil|ifNilEval|ifTrue|isActive|isNil|isResumable|list|message|method|parent|pass|pause|perform|performWithArgList|print|println|proto|raise|raiseResumable|removeSlot|resend|resume|schedulerSleepSeconds|self|sender|setSchedulerSleepSeconds|setSlot|shallowCopy|slotNames|super|system|then|thisBlock|thisContext|try|type|uniqueId|updateSlot|wait|while|write|yield)\b/,builtin:/\b(?:Array|AudioDevice|AudioMixer|BigNum|Block|Box|Buffer|CFunction|CGI|Color|Curses|DBM|DNSResolver|DOConnection|DOProxy|DOServer|Date|Directory|Duration|DynLib|Error|Exception|FFT|File|Fnmatch|Font|Future|GL|GLE|GLScissor|GLU|GLUCylinder|GLUQuadric|GLUSphere|GLUT|Host|Image|Importer|LinkList|List|Lobby|Locals|MD5|MP3Decoder|MP3Encoder|Map|Message|Movie|Notification|Number|Object|OpenGL|Point|Protos|Random|Regex|SGML|SGMLElement|SGMLParser|SQLite|Sequence|Server|ShowMessage|SleepyCat|SleepyCatCursor|Socket|SocketManager|Sound|Soup|Store|String|Tree|UDPSender|UPDReceiver|URL|User|Warning|WeakLink)\b/,boolean:/\b(?:false|nil|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?/i,operator:/[=!*/%+\-^&|]=|>>?=?|<<?=?|:?:?=|\+\+?|--?|\*\*?|\/\/?|%|\|\|?|&&?|\b(?:and|not|or|return)\b|@@?|\?\??|\.\./,punctuation:/[{}[\];(),.:]/}}vS.displayName="j";vS.aliases=[];function vS(e){e.languages.j={comment:{pattern:/\bNB\..*/,greedy:!0},string:{pattern:/'(?:''|[^'\r\n])*'/,greedy:!0},keyword:/\b(?:(?:CR|LF|adverb|conjunction|def|define|dyad|monad|noun|verb)\b|(?:assert|break|case|catch[dt]?|continue|do|else|elseif|end|fcase|for|for_\w+|goto_\w+|if|label_\w+|return|select|throw|try|while|whilst)\.)/,verb:{pattern:/(?!\^:|;\.|[=!][.:])(?:\{(?:\.|::?)?|p(?:\.\.?|:)|[=!\]]|[<>+*\-%$|,#][.:]?|[?^]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/,alias:"keyword"},number:/\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:ad|ar|[ejpx])_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_\b(?!\.))/,adverb:{pattern:/[~}]|[\/\\]\.?|[bfM]\.|t[.:]/,alias:"builtin"},operator:/[=a][.:]|_\./,conjunction:{pattern:/&(?:\.:?|:)?|[.:@][.:]?|[!D][.:]|[;dHT]\.|`:?|[\^LS]:|"/,alias:"variable"},punctuation:/[()]/}}Dc.displayName="javadoclike";Dc.aliases=[];function Dc(e){(function(t){var n=t.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};function s(o,u){var c="doc-comment",d=t.languages[o];if(d){var h=d[c];if(!h){var p={};p[c]={pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"},d=t.languages.insertBefore(o,"comment",p),h=d[c]}if(h instanceof RegExp&&(h=d[c]={pattern:h}),Array.isArray(h))for(var m=0,g=h.length;m<g;m++)h[m]instanceof RegExp&&(h[m]={pattern:h[m]}),u(h[m]);else u(h)}}function a(o,u){typeof o=="string"&&(o=[o]),o.forEach(function(c){s(c,function(d){d.inside||(d.inside={}),d.inside.rest=u})})}Object.defineProperty(n,"addSupport",{value:a}),n.addSupport(["java","javascript","php"],n)})(e)}yS.displayName="scala";yS.aliases=[];function yS(e){e.register(Oo),e.languages.scala=e.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|derives|do|else|enum|extends|extension|final|finally|for|forSome|given|if|implicit|import|infix|inline|lazy|match|new|null|object|opaque|open|override|package|private|protected|return|sealed|self|super|this|throw|trait|transparent|try|type|using|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),e.languages.insertBefore("scala","triple-quoted-string",{"string-interpolation":{pattern:/\b[a-z]\w*(?:"""(?:[^$]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*?"""|"(?:[^$"\r\n]|\$(?:[^{]|\{(?:[^{}]|\{[^{}]*\})*\}))*")/i,greedy:!0,inside:{id:{pattern:/^\w+/,greedy:!0,alias:"function"},escape:{pattern:/\\\$"|\$[$"]/,greedy:!0,alias:"symbol"},interpolation:{pattern:/\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/,greedy:!0,inside:{punctuation:/^\$\{?|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.scala}}},string:/[\s\S]+/}}}),delete e.languages.scala["class-name"],delete e.languages.scala.function,delete e.languages.scala.constant}ES.displayName="javadoc";ES.aliases=[];function ES(e){e.register(Oo),e.register(Dc),e.register(ur),(function(t){var n=/(^(?:[\t ]*(?:\*\s*)*))[^*\s].*$/m,s=/#\s*\w+(?:\s*\([^()]*\))?/.source,a=/(?:\b[a-zA-Z]\w+\s*\.\s*)*\b[A-Z]\w*(?:\s*<mem>)?|<mem>/.source.replace(/<mem>/g,function(){return s});t.languages.javadoc=t.languages.extend("javadoclike",{}),t.languages.insertBefore("javadoc","keyword",{reference:{pattern:RegExp(/(@(?:exception|link|linkplain|see|throws|value)\s+(?:\*\s*)?)/.source+"(?:"+a+")"),lookbehind:!0,inside:{function:{pattern:/(#\s*)\w+(?=\s*\()/,lookbehind:!0},field:{pattern:/(#\s*)\w+/,lookbehind:!0},namespace:{pattern:/\b(?:[a-z]\w*\s*\.\s*)+/,inside:{punctuation:/\./}},"class-name":/\b[A-Z]\w*/,keyword:t.languages.java.keyword,punctuation:/[#()[\],.]/}},"class-name":{pattern:/(@param\s+)<[A-Z]\w*>/,lookbehind:!0,inside:{punctuation:/[.<>]/}},"code-section":[{pattern:/(\{@code\s+(?!\s))(?:[^\s{}]|\s+(?![\s}])|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+(?=\s*\})/,lookbehind:!0,inside:{code:{pattern:n,lookbehind:!0,inside:t.languages.java,alias:"language-java"}}},{pattern:/(<(code|pre|tt)>(?!<code>)\s*)\S(?:\S|\s+\S)*?(?=\s*<\/\2>)/,lookbehind:!0,inside:{line:{pattern:n,lookbehind:!0,inside:{tag:t.languages.markup.tag,entity:t.languages.markup.entity,code:{pattern:/.+/,inside:t.languages.java,alias:"language-java"}}}}}],tag:t.languages.markup.tag,entity:t.languages.markup.entity}),t.languages.javadoclike.addSupport("java",t.languages.javadoc)})(e)}SS.displayName="javastacktrace";SS.aliases=[];function SS(e){e.languages.javastacktrace={summary:{pattern:/^([\t ]*)(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,lookbehind:!0,inside:{keyword:{pattern:/^([\t ]*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,lookbehind:!0},string:{pattern:/^(\s*)"[^"]*"/,lookbehind:!0},exceptions:{pattern:/^(:?\s*)[\w$.]+(?=:|$)/,lookbehind:!0,inside:{"class-name":/[\w$]+$/,namespace:/\b[a-z]\w*\b/,punctuation:/\./}},message:{pattern:/(:\s*)\S.*/,lookbehind:!0,alias:"string"},punctuation:/:/}},"stack-frame":{pattern:/^([\t ]*)at (?:[\w$./]|@[\w$.+-]*\/)+(?:<init>)?\([^()]*\)/m,lookbehind:!0,inside:{keyword:{pattern:/^(\s*)at(?= )/,lookbehind:!0},source:[{pattern:/(\()\w+\.\w+:\d+(?=\))/,lookbehind:!0,inside:{file:/^\w+\.\w+/,punctuation:/:/,"line-number":{pattern:/\b\d+\b/,alias:"number"}}},{pattern:/(\()[^()]*(?=\))/,lookbehind:!0,inside:{keyword:/^(?:Native Method|Unknown Source)$/}}],"class-name":/[\w$]+(?=\.(?:<init>|[\w$]+)\()/,function:/(?:<init>|[\w$]+)(?=\()/,"class-loader":{pattern:/(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/,lookbehind:!0,alias:"namespace",inside:{punctuation:/\./}},module:{pattern:/([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/,lookbehind:!0,inside:{version:{pattern:/(@)[\s\S]+/,lookbehind:!0,alias:"number"},punctuation:/[@.]/}},namespace:{pattern:/(?:\b[a-z]\w*\.)+/,inside:{punctuation:/\./}},punctuation:/[()/.]/}},more:{pattern:/^([\t ]*)\.{3} \d+ [a-z]+(?: [a-z]+)*/m,lookbehind:!0,inside:{punctuation:/\.{3}/,number:/\d+/,keyword:/\b[a-z]+(?: [a-z]+)*\b/}}}}_S.displayName="jexl";_S.aliases=[];function _S(e){e.languages.jexl={string:/(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/,transform:{pattern:/(\|\s*)[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*/,alias:"function",lookbehind:!0},function:/[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*\s*(?=\()/,number:/\b\d+(?:\.\d+)?\b|\B\.\d+\b/,operator:/[<>!]=?|-|\+|&&|==|\|\|?|\/\/?|[?:*^%]/,boolean:/\b(?:false|true)\b/,keyword:/\bin\b/,punctuation:/[{}[\](),.]/}}wS.displayName="jolie";wS.aliases=[];function wS(e){e.register(zt),e.languages.jolie=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\[\s\S]|[^"\\])*"/,lookbehind:!0,greedy:!0},"class-name":{pattern:/((?:\b(?:as|courier|embed|in|inputPort|outputPort|service)\b|@)[ \t]*)\w+/,lookbehind:!0},keyword:/\b(?:as|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embed|embedded|execution|exit|extender|for|foreach|forward|from|global|if|import|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|private|provide|public|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,function:/\b[a-z_]\w*(?=[ \t]*[@(])/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,operator:/-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[?\/%^@|]/,punctuation:/[()[\]{},;.:]/,builtin:/\b(?:Byte|any|bool|char|double|enum|float|int|length|long|ranges|regex|string|undefined|void)\b/}),e.languages.insertBefore("jolie","keyword",{aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{keyword:/\bwith\b/,"class-name":/\w+/,punctuation:/,/}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:/,/,"class-name":/\w+/,operator:/=>/}},property:{pattern:/\b(?:Aggregates|[Ii]nterfaces|Java|Javascript|Jolie|[Ll]ocation|OneWay|[Pp]rotocol|Redirects|RequestResponse)\b(?=[ \t]*:)/}})}CS.displayName="jq";CS.aliases=[];function CS(e){(function(t){var n=/\\\((?:[^()]|\([^()]*\))*\)/.source,s=RegExp(/(^|[^\\])"(?:[^"\r\n\\]|\\[^\r\n(]|__)*"/.source.replace(/__/g,function(){return n})),a={interpolation:{pattern:RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+n),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},o=t.languages.jq={comment:/#.*/,property:{pattern:RegExp(s.source+/(?=\s*:(?!:))/.source),lookbehind:!0,greedy:!0,inside:a},string:{pattern:s,lookbehind:!0,greedy:!0,inside:a},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/\b[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|not|or)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};a.interpolation.inside.content.inside=o})(e)}NS.displayName="js-templates";NS.aliases=[];function NS(e){e.register(yr),(function(t){var n=t.languages.javascript["template-string"],s=n.pattern.source,a=n.inside.interpolation,o=a.inside["interpolation-punctuation"],u=a.pattern.source;function c(C,S){if(t.languages[C])return{pattern:RegExp("((?:"+S+")\\s*)"+s),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:C}}}}t.languages.javascript["template-string"]=[c("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),c("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),c("svg",/\bsvg/.source),c("markdown",/\b(?:markdown|md)/.source),c("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),c("sql",/\bsql/.source),n].filter(Boolean);function d(C,S){return"___"+S.toUpperCase()+"_"+C+"___"}function h(C,S,b){var y={code:C,grammar:S,language:b};return t.hooks.run("before-tokenize",y),y.tokens=t.tokenize(y.code,y.grammar),t.hooks.run("after-tokenize",y),y.tokens}function p(C){var S={};S["interpolation-punctuation"]=o;var b=t.tokenize(C,S);if(b.length===3){var y=[1,1];y.push.apply(y,h(b[1],t.languages.javascript,"javascript")),b.splice.apply(b,y)}return new t.Token("interpolation",b,a.alias,C)}function m(C,S,b){var y=t.tokenize(C,{interpolation:{pattern:RegExp(u),lookbehind:!0}}),E=0,_={},N=y.map(function(R){if(typeof R=="string")return R;for(var M=R.content,L;C.indexOf(L=d(E++,b))!==-1;);return _[L]=M,L}).join(""),A=h(N,S,b),k=Object.keys(_);E=0;function I(R){for(var M=0;M<R.length;M++){if(E>=k.length)return;var L=R[M];if(typeof L=="string"||typeof L.content=="string"){var $=k[E],H=typeof L=="string"?L:L.content,B=H.indexOf($);if(B!==-1){++E;var z=H.substring(0,B),Q=p(_[$]),P=H.substring(B+$.length),X=[];if(z&&X.push(z),X.push(Q),P){var Y=[P];I(Y),X.push.apply(X,Y)}typeof L=="string"?(R.splice.apply(R,[M,1].concat(X)),M+=X.length-1):L.content=X}}else{var F=L.content;Array.isArray(F)?I(F):I([F])}}}return I(A),new t.Token(b,A,"language-"+b,C)}var g={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};t.hooks.add("after-tokenize",function(C){if(!(C.language in g))return;function S(b){for(var y=0,E=b.length;y<E;y++){var _=b[y];if(typeof _!="string"){var N=_.content;if(!Array.isArray(N)){typeof N!="string"&&S([N]);continue}if(_.type==="template-string"){var A=N[1];if(N.length===3&&typeof A!="string"&&A.type==="embedded-code"){var k=v(A),I=A.alias,R=Array.isArray(I)?I[0]:I,M=t.languages[R];if(!M)continue;N[1]=m(k,M,R)}}else S(N)}}}S(C.tokens)});function v(C){return typeof C=="string"?C:Array.isArray(C)?C.map(v).join(""):v(C.content)}})(e)}TS.displayName="jsdoc";TS.aliases=[];function TS(e){e.register(Dc),e.register(yr),e.register(Ac),(function(t){var n=t.languages.javascript,s=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,a="(@(?:arg|argument|param|property)\\s+(?:"+s+"\\s+)?)";t.languages.jsdoc=t.languages.extend("javadoclike",{parameter:{pattern:RegExp(a+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),t.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(a+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:n,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:<TYPE>\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(/<TYPE>/g,function(){return s})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+s),lookbehind:!0,inside:{string:n.string,number:n.number,boolean:n.boolean,keyword:t.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:n,alias:"language-javascript"}}}}),t.languages.javadoclike.addSupport("javascript",t.languages.jsdoc)})(e)}AS.displayName="n4js";AS.aliases=["n4jsd"];function AS(e){e.register(yr),e.languages.n4js=e.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),e.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),e.languages.n4jsd=e.languages.n4js}kS.displayName="js-extras";kS.aliases=[];function kS(e){e.register(yr),(function(t){t.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+t.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),t.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+t.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),t.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]});function n(d,h){return RegExp(d.replace(/<ID>/g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),h)}t.languages.insertBefore("javascript","keyword",{imports:{pattern:n(/(\bimport\b\s*)(?:<ID>(?:\s*,\s*(?:\*\s*as\s+<ID>|\{[^{}]*\}))?|\*\s*as\s+<ID>|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:t.languages.javascript},exports:{pattern:n(/(\bexport\b\s*)(?:\*(?:\s*as\s+<ID>)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:t.languages.javascript}}),t.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),t.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),t.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:n(/(\.\s*)#?<ID>/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var s=["function","function-variable","method","method-variable","property-access"],a=0;a<s.length;a++){var o=s[a],u=t.languages.javascript[o];t.util.type(u)==="RegExp"&&(u=t.languages.javascript[o]={pattern:u});var c=u.inside||{};u.inside=c,c["maybe-class-name"]=/^[A-Z][\s\S]*/}})(e)}RS.displayName="json5";RS.aliases=[];function RS(e){e.register(Nc),(function(t){var n=/("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/;t.languages.json5=t.languages.extend("json",{property:[{pattern:RegExp(n.source+"(?=\\s*:)"),greedy:!0},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/,alias:"unquoted"}],string:{pattern:n,greedy:!0},number:/[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+\b)?/})})(e)}DS.displayName="jsonp";DS.aliases=[];function DS(e){e.register(Nc),e.languages.jsonp=e.languages.extend("json",{punctuation:/[{}[\]();,.]/}),e.languages.insertBefore("jsonp","punctuation",{function:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*\()/})}IS.displayName="jsstacktrace";IS.aliases=[];function IS(e){e.languages.jsstacktrace={"error-message":{pattern:/^\S.*/m,alias:"string"},"stack-frame":{pattern:/(^[ \t]+)at[ \t].*/m,lookbehind:!0,inside:{"not-my-code":{pattern:/^at[ \t]+(?!\s)(?:node\.js|<unknown>|.*(?:node_modules|\(<anonymous>\)|\(<unknown>|<anonymous>$|\(internal\/|\(node\.js)).*/m,alias:"comment"},filename:{pattern:/(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,lookbehind:!0,alias:"url"},function:{pattern:/(\bat\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,lookbehind:!0,inside:{punctuation:/\./}},punctuation:/[()]/,keyword:/\b(?:at|new)\b/,alias:{pattern:/\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,alias:"variable"},"line-number":{pattern:/:\d+(?::\d+)?\b/,alias:"number",inside:{punctuation:/:/}}}}}}jS.displayName="julia";jS.aliases=[];function jS(e){e.languages.julia={comment:{pattern:/(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,lookbehind:!0},regex:{pattern:/r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,greedy:!0},string:{pattern:/"""[\s\S]+?"""|(?:\b\w+)?"(?:\\.|[^"\\\r\n])*"|`(?:[^\\`\r\n]|\\.)*`/,greedy:!0},char:{pattern:/(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'/,lookbehind:!0,greedy:!0},keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,operator:/&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/,punctuation:/::?|[{}[\]();,.?]/,constant:/\b(?:(?:Inf|NaN)(?:16|32|64)?|im|pi)\b|[πℯ]/}}OS.displayName="keepalived";OS.aliases=[];function OS(e){e.languages.keepalived={comment:{pattern:/[#!].*/,greedy:!0},string:{pattern:/(^|[^\\])(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,lookbehind:!0,greedy:!0},ip:{pattern:RegExp(/\b(?:(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){5}:(?:[\da-f]{1,4}:)?[\da-f]{1,4}|(?:[\da-f]{1,4}:){4}:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4}|(?:[\da-f]{1,4}:){3}:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4}|(?:[\da-f]{1,4}:){2}:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}<ipv4>|(?:[\da-f]{1,4}:){0,5}:<ipv4>|::(?:[\da-f]{1,4}:){0,5}<ipv4>|[\da-f]{1,4}::(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4}|::(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:)(?:\/\d{1,3})?|<ipv4>(?:\/\d{1,2})?)\b/.source.replace(/<ipv4>/g,function(){return/(?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d))/.source}),"i"),alias:"number"},path:{pattern:/(\s)\/(?:[^\/\s]+\/)*[^\/\s]*|\b[a-zA-Z]:\\(?:[^\\\s]+\\)*[^\\\s]*/,lookbehind:!0,alias:"string"},variable:/\$\{?\w+\}?/,email:{pattern:/[\w-]+@[\w-]+(?:\.[\w-]{2,3}){1,2}/,alias:"string"},"conditional-configuration":{pattern:/@\^?[\w-]+/,alias:"variable"},operator:/=/,property:/\b(?:BFD_CHECK|DNS_CHECK|FILE_CHECK|HTTP_GET|MISC_CHECK|NAME|PING_CHECK|SCRIPTS|SMTP_CHECK|SSL|SSL_GET|TCP_CHECK|UDP_CHECK|accept|advert_int|alpha|auth_pass|auth_type|authentication|bfd_cpu_affinity|bfd_instance|bfd_no_swap|bfd_priority|bfd_process_name|bfd_rlimit_rttime|bfd_rt_priority|bind_if|bind_port|bindto|ca|certificate|check_unicast_src|checker|checker_cpu_affinity|checker_log_all_failures|checker_no_swap|checker_priority|checker_rlimit_rttime|checker_rt_priority|child_wait_time|connect_ip|connect_port|connect_timeout|dbus_service_name|debug|default_interface|delay|delay_before_retry|delay_loop|digest|dont_track_primary|dynamic|dynamic_interfaces|enable_(?:dbus|script_security|sni|snmp_checker|snmp_rfc|snmp_rfcv2|snmp_rfcv3|snmp_vrrp|traps)|end|fall|fast_recovery|file|flag-[123]|fork_delay|full_command|fwmark|garp_group|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|global_defs|global_tracking|gna_interval|group|ha_suspend|hashed|helo_name|higher_prio_send_advert|hoplimit|http_protocol|hysteresis|idle_tx|include|inhibit_on_failure|init_fail|init_file|instance|interface|interfaces|interval|ip_family|ipvs_process_name|keepalived.conf|kernel_rx_buf_size|key|linkbeat_interfaces|linkbeat_use_polling|log_all_failures|log_unknown_vrids|lower_prio_no_advert|lthreshold|lvs_flush|lvs_flush_onstop|lvs_method|lvs_netlink_cmd_rcv_bufs|lvs_netlink_cmd_rcv_bufs_force|lvs_netlink_monitor_rcv_bufs|lvs_netlink_monitor_rcv_bufs_force|lvs_notify_fifo|lvs_notify_fifo_script|lvs_sched|lvs_sync_daemon|max_auto_priority|max_hops|mcast_src_ip|mh-fallback|mh-port|min_auto_priority_delay|min_rx|min_tx|misc_dynamic|misc_path|misc_timeout|multiplier|name|namespace_with_ipsets|native_ipv6|neighbor_ip|net_namespace|net_namespace_ipvs|nftables|nftables_counters|nftables_ifindex|nftables_priority|no_accept|no_checker_emails|no_email_faults|nopreempt|notification_email|notification_email_from|notify|notify_backup|notify_deleted|notify_down|notify_fault|notify_fifo|notify_fifo_script|notify_master|notify_master_rx_lower_pri|notify_priority_changes|notify_stop|notify_up|old_unicast_checksum|omega|ops|param_match|passive|password|path|persistence_engine|persistence_granularity|persistence_timeout|preempt|preempt_delay|priority|process|process_monitor_rcv_bufs|process_monitor_rcv_bufs_force|process_name|process_names|promote_secondaries|protocol|proxy_arp|proxy_arp_pvlan|quorum|quorum_down|quorum_max|quorum_up|random_seed|real_server|regex|regex_max_offset|regex_min_offset|regex_no_match|regex_options|regex_stack|reload_repeat|reload_time_file|require_reply|retry|rise|router_id|rs_init_notifies|script|script_user|sh-fallback|sh-port|shutdown_script|shutdown_script_timeout|skip_check_adv_addr|smtp_alert|smtp_alert_checker|smtp_alert_vrrp|smtp_connect_timeout|smtp_helo_name|smtp_server|snmp_socket|sorry_server|sorry_server_inhibit|sorry_server_lvs_method|source_ip|start|startup_script|startup_script_timeout|state|static_ipaddress|static_routes|static_rules|status_code|step|strict_mode|sync_group_tracking_weight|terminate_delay|timeout|track_bfd|track_file|track_group|track_interface|track_process|track_script|track_src_ip|ttl|type|umask|unicast_peer|unicast_src_ip|unicast_ttl|url|use_ipvlan|use_pid_dir|use_vmac|user|uthreshold|val[123]|version|virtual_ipaddress|virtual_ipaddress_excluded|virtual_router_id|virtual_routes|virtual_rules|virtual_server|virtual_server_group|virtualhost|vmac_xmit_base|vrrp|vrrp_(?:check_unicast_src|cpu_affinity|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|gna_interval|higher_prio_send_advert|instance|ipsets|iptables|lower_prio_no_advert|mcast_group4|mcast_group6|min_garp|netlink_cmd_rcv_bufs|netlink_cmd_rcv_bufs_force|netlink_monitor_rcv_bufs|netlink_monitor_rcv_bufs_force|no_swap|notify_fifo|notify_fifo_script|notify_priority_changes|priority|process_name|rlimit_rttime|rt_priority|rx_bufs_multiplier|rx_bufs_policy|script|skip_check_adv_addr|startup_delay|strict|sync_group|track_process|version)|warmup|weight)\b/,constant:/\b(?:A|AAAA|AH|BACKUP|CNAME|DR|MASTER|MX|NAT|NS|PASS|SCTP|SOA|TCP|TUN|TXT|UDP|dh|fo|lblc|lblcr|lc|mh|nq|ovf|rr|sed|sh|wlc|wrr)\b/,number:{pattern:/(^|[^\w.-])-?\d+(?:\.\d+)?/,lookbehind:!0},boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\{\}]/}}LS.displayName="keyman";LS.aliases=[];function LS(e){e.languages.keyman={comment:{pattern:/\bc .*/i,greedy:!0},string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},"virtual-key":{pattern:/\[\s*(?:(?:ALT|CAPS|CTRL|LALT|LCTRL|NCAPS|RALT|RCTRL|SHIFT)\s+)*(?:[TKU]_[\w?]+|[A-E]\d\d?|"[^"\r\n]*"|'[^'\r\n]*')\s*\]/i,greedy:!0,alias:"function"},"header-keyword":{pattern:/&\w+/,alias:"bold"},"header-statement":{pattern:/\b(?:bitmap|bitmaps|caps always off|caps on only|copyright|hotkey|language|layout|message|name|shift frees caps|version)\b/i,alias:"bold"},"rule-keyword":{pattern:/\b(?:any|baselayout|beep|call|context|deadkey|dk|if|index|layer|notany|nul|outs|platform|reset|return|save|set|store|use)\b/i,alias:"keyword"},"structural-keyword":{pattern:/\b(?:ansi|begin|group|match|newcontext|nomatch|postkeystroke|readonly|unicode|using keys)\b/i,alias:"keyword"},"compile-target":{pattern:/\$(?:keyman|keymanonly|keymanweb|kmfl|weaver):/i,alias:"property"},number:/\b(?:U\+[\dA-F]+|d\d+|x[\da-f]+|\d+)\b/i,operator:/[+>\\$]|\.\./,punctuation:/[()=,]/}}MS.displayName="kumir";MS.aliases=["kum"];function MS(e){(function(t){var n=/\s\x00-\x1f\x22-\x2f\x3a-\x3f\x5b-\x5e\x60\x7b-\x7e/.source;function s(a,o){return RegExp(a.replace(/<nonId>/g,n),o)}t.languages.kumir={comment:{pattern:/\|.*/},prolog:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^\n\r"]*"|'[^\n\r']*'/,greedy:!0},boolean:{pattern:s(/(^|[<nonId>])(?:да|нет)(?=[<nonId>]|$)/.source),lookbehind:!0},"operator-word":{pattern:s(/(^|[<nonId>])(?:и|или|не)(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"keyword"},"system-variable":{pattern:s(/(^|[<nonId>])знач(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"keyword"},type:[{pattern:s(/(^|[<nonId>])(?:вещ|лит|лог|сим|цел)(?:\x20*таб)?(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"builtin"},{pattern:s(/(^|[<nonId>])(?:компл|сканкод|файл|цвет)(?=[<nonId>]|$)/.source),lookbehind:!0,alias:"important"}],keyword:{pattern:s(/(^|[<nonId>])(?:алг|арг(?:\x20*рез)?|ввод|ВКЛЮЧИТЬ|вс[её]|выбор|вывод|выход|дано|для|до|дс|если|иначе|исп|использовать|кон(?:(?:\x20+|_)исп)?|кц(?:(?:\x20+|_)при)?|надо|нач|нс|нц|от|пауза|пока|при|раза?|рез|стоп|таб|то|утв|шаг)(?=[<nonId>]|$)/.source),lookbehind:!0},name:{pattern:s(/(^|[<nonId>])[^\d<nonId>][^<nonId>]*(?:\x20+[^<nonId>]+)*(?=[<nonId>]|$)/.source),lookbehind:!0},number:{pattern:s(/(^|[<nonId>])(?:\B\$[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?=[<nonId>]|$)/.source,"i"),lookbehind:!0},punctuation:/:=|[(),:;\[\]]/,"operator-char":{pattern:/\*\*?|<[=>]?|>=?|[-+/=]/,alias:"operator"}},t.languages.kum=t.languages.kumir})(e)}FS.displayName="kusto";FS.aliases=[];function FS(e){e.languages.kusto={comment:{pattern:/\/\/.*/,greedy:!0},string:{pattern:/```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/,greedy:!0},verb:{pattern:/(\|\s*)[a-z][\w-]*/i,lookbehind:!0,alias:"keyword"},command:{pattern:/\.[a-z][a-z\d-]*\b/,alias:"keyword"},"class-name":/\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/,keyword:/\b(?:access|alias|and|anti|as|asc|auto|between|by|(?:contains|(?:ends|starts)with|has(?:perfix|suffix)?)(?:_cs)?|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/,boolean:/\b(?:false|null|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/,datetime:[{pattern:/\b(?:(?:Fri|Friday|Mon|Monday|Sat|Saturday|Sun|Sunday|Thu|Thursday|Tue|Tuesday|Wed|Wednesday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:[A-Z]|(?:[ECMT][DS]|GM|U)T)|[+-]\d{4}))?\b/,alias:"number"},{pattern:/[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/,alias:"number"}],number:/\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|[dhms]|microsecond|tick)\b)?|[+-]?\binf\b/,operator:/=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./,punctuation:/[()\[\]{},;.:]/}}PS.displayName="latex";PS.aliases=["context","tex"];function PS(e){(function(t){var n=/\\(?:[^a-z()[\]]|[a-z*]+)/i,s={"equation-command":{pattern:n,alias:"regex"}};t.languages.latex={comment:/%.*/,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:s,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:s,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:n,alias:"selector"},punctuation:/[[\]{}&]/},t.languages.tex=t.languages.latex,t.languages.context=t.languages.latex})(e)}BS.displayName="latte";BS.aliases=[];function BS(e){e.register(zt),e.register(Er),e.register(Lo),(function(t){t.languages.latte={comment:/^\{\*[\s\S]*/,"latte-tag":{pattern:/(^\{(?:\/(?=[a-z]))?)(?:[=_]|[a-z]\w*\b(?!\())/i,lookbehind:!0,alias:"important"},delimiter:{pattern:/^\{\/?|\}$/,alias:"punctuation"},php:{pattern:/\S(?:[\s\S]*\S)?/,alias:"language-php",inside:t.languages.php}};var n=t.languages.extend("markup",{});t.languages.insertBefore("inside","attr-value",{"n-attr":{pattern:/n:[\w-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+))?/,inside:{"attr-name":{pattern:/^[^\s=]+/,alias:"important"},"attr-value":{pattern:/=[\s\S]+/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}],php:{pattern:/\S(?:[\s\S]*\S)?/,inside:t.languages.php}}}}}},n.tag),t.hooks.add("before-tokenize",function(s){if(s.language==="latte"){var a=/\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*(?:[^*]|\*(?!\/))*\*\/)*\}/g;t.languages["markup-templating"].buildPlaceholders(s,"latte",a),s.grammar=n}}),t.hooks.add("after-tokenize",function(s){t.languages["markup-templating"].tokenizePlaceholders(s,"latte")})})(e)}ah.displayName="scheme";ah.aliases=[];function ah(e){(function(t){t.languages.scheme={comment:/;.*|#;\s*(?:\((?:[^()]|\([^()]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\])|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()\[\]#'\s]+/,greedy:!0},char:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,greedy:!0},"lambda-parameter":[{pattern:/((?:^|[^'`#])[(\[]lambda\s+)(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])[(\[]lambda\s+[(\[])[^()\[\]']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|except|export|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])[(\[])(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\[\]\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])[(\[])(?:[-+*%/]|[<>]=?|=>?)(?=[()\[\]\s]|$)/,lookbehind:!0},number:{pattern:RegExp(n({"<ureal dec>":/\d+(?:\/\d+)|(?:\d+(?:\.\d*)?|\.\d+)(?:[esfdl][+-]?\d+)?/.source,"<real dec>":/[+-]?<ureal dec>|[+-](?:inf|nan)\.0/.source,"<imaginary dec>":/[+-](?:<ureal dec>|(?:inf|nan)\.0)?i/.source,"<complex dec>":/<real dec>(?:@<real dec>|<imaginary dec>)?|<imaginary dec>/.source,"<num dec>":/(?:#d(?:#[ei])?|#[ei](?:#d)?)?<complex dec>/.source,"<ureal box>":/[0-9a-f]+(?:\/[0-9a-f]+)?/.source,"<real box>":/[+-]?<ureal box>|[+-](?:inf|nan)\.0/.source,"<imaginary box>":/[+-](?:<ureal box>|(?:inf|nan)\.0)?i/.source,"<complex box>":/<real box>(?:@<real box>|<imaginary box>)?|<imaginary box>/.source,"<num box>":/#[box](?:#[ei])?|(?:#[ei])?#[box]<complex box>/.source,"<number>":/(^|[()\[\]\s])(?:<num dec>|<num box>)(?=[()\[\]\s]|$)/.source}),"i"),lookbehind:!0},boolean:{pattern:/(^|[()\[\]\s])#(?:[ft]|false|true)(?=[()\[\]\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])[(\[])(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\[\]\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[()\[\]\s])\|(?:[^\\|]|\\.)*\|(?=[()\[\]\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()\[\]']/};function n(s){for(var a in s)s[a]=s[a].replace(/<[\w\s]+>/g,function(o){return"(?:"+s[o].trim()+")"});return s[a]}})(e)}US.displayName="lilypond";US.aliases=["ly"];function US(e){e.register(ah),(function(t){for(var n=/\((?:[^();"#\\]|\\[\s\S]|;.*(?!.)|"(?:[^"\\]|\\.)*"|#(?:\{(?:(?!#\})[\s\S])*#\}|[^{])|<expr>)*\)/.source,s=5,a=0;a<s;a++)n=n.replace(/<expr>/g,function(){return n});n=n.replace(/<expr>/g,/[^\s\S]/.source);var o=t.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp(/(^|[=\s])#(?:"(?:[^"\\]|\\.)*"|[^\s()"]*(?:[^\s()]|<expr>))/.source.replace(/<expr>/g,function(){return n}),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:t.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};o["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=o,t.languages.ly=o})(e)}HS.displayName="liquid";HS.aliases=[];function HS(e){e.register(Er),e.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},e.hooks.add("before-tokenize",function(t){var n=/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,s=!1;e.languages["markup-templating"].buildPlaceholders(t,"liquid",n,function(a){var o=/^\{%-?\s*(\w+)/.exec(a);if(o){var u=o[1];if(u==="raw"&&!s)return s=!0,!0;if(u==="endraw")return s=!1,!0}return!s})}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"liquid")})}$S.displayName="lisp";$S.aliases=["elisp","emacs","emacs-lisp"];function $S(e){(function(t){function n(C){return RegExp(/(\()/.source+"(?:"+C+")"+/(?=[\s\)])/.source)}function s(C){return RegExp(/([\s([])/.source+"(?:"+C+")"+/(?=[\s)])/.source)}var a=/(?!\d)[-+*/~!@$%^=<>{}\w]+/.source,o="&"+a,u="(\\()",c="(?=\\))",d="(?=\\s)",h=/(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source,p={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+a+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+a),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+a),alias:"property"},splice:{pattern:RegExp(",@?"+a),alias:["symbol","variable"]},keyword:[{pattern:RegExp(u+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+d),lookbehind:!0},{pattern:RegExp(u+"(?:append|by|collect|concat|do|finally|for|in|return)"+d),lookbehind:!0}],declare:{pattern:n(/declare/.source),lookbehind:!0,alias:"keyword"},interactive:{pattern:n(/interactive/.source),lookbehind:!0,alias:"keyword"},boolean:{pattern:s(/nil|t/.source),lookbehind:!0},number:{pattern:s(/[-+]?\d+(?:\.\d*)?/.source),lookbehind:!0},defvar:{pattern:RegExp(u+"def(?:const|custom|group|var)\\s+"+a),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(a)}},defun:{pattern:RegExp(u+/(?:cl-)?(?:defmacro|defun\*?)\s+/.source+a+/\s+\(/.source+h+/\)/.source),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+a),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(u+"lambda\\s+\\(\\s*(?:&?"+a+"(?:\\s+&?"+a+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(u+a),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},m={"lisp-marker":RegExp(o),varform:{pattern:RegExp(/\(/.source+a+/\s+(?=\S)/.source+h+/\)/.source),inside:p},argument:{pattern:RegExp(/(^|[\s(])/.source+a),lookbehind:!0,alias:"variable"},rest:p},g="\\S+(?:\\s+\\S+)*",v={pattern:RegExp(u+h+c),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+g),inside:m},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+g),inside:m},keys:{pattern:RegExp("&key\\s+"+g+"(?:\\s+&allow-other-keys)?"),inside:m},argument:{pattern:RegExp(a),alias:"variable"},punctuation:/[()]/}};p.lambda.inside.arguments=v,p.defun.inside.arguments=t.util.clone(v),p.defun.inside.arguments.inside.sublist=v,t.languages.lisp=p,t.languages.elisp=p,t.languages.emacs=p,t.languages["emacs-lisp"]=p})(e)}zS.displayName="livescript";zS.aliases=[];function zS(e){e.languages.livescript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\])#.*/,lookbehind:!0}],"interpolated-string":{pattern:/(^|[^"])("""|")(?:\\[\s\S]|(?!\2)[^\\])*\2(?!")/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(^|[^\\])#[a-z_](?:-?[a-z]|[\d_])*/m,lookbehind:!0},interpolation:{pattern:/(^|[^\\])#\{[^}]+\}/m,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^#\{|\}$/,alias:"variable"}}},string:/[\s\S]+/}},string:[{pattern:/('''|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/<\[[\s\S]*?\]>/,greedy:!0},/\\[^\s,;\])}]+/],regex:[{pattern:/\/\/(?:\[[^\r\n\]]*\]|\\.|(?!\/\/)[^\\\[])+\/\/[gimyu]{0,5}/,greedy:!0,inside:{comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0}}},{pattern:/\/(?:\[[^\r\n\]]*\]|\\.|[^/\\\r\n\[])+\/[gimyu]{0,5}/,greedy:!0}],keyword:{pattern:/(^|(?!-).)\b(?:break|case|catch|class|const|continue|default|do|else|extends|fallthrough|finally|for(?: ever)?|function|if|implements|it|let|loop|new|null|otherwise|own|return|super|switch|that|then|this|throw|try|unless|until|var|void|when|while|yield)(?!-)\b/m,lookbehind:!0},"keyword-operator":{pattern:/(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?: not|nt)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m,lookbehind:!0,alias:"operator"},boolean:{pattern:/(^|[^-])\b(?:false|no|off|on|true|yes)(?!-)\b/m,lookbehind:!0},argument:{pattern:/(^|(?!\.&\.)[^&])&(?!&)\d*/m,lookbehind:!0,alias:"variable"},number:/\b(?:\d+~[\da-z]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[a-z]\w*)?)/i,identifier:/[a-z_](?:-?[a-z]|[\d_])*/i,operator:[{pattern:/( )\.(?= )/,lookbehind:!0},/\.(?:[=~]|\.\.?)|\.(?:[&|^]|<<|>>>?)\.|:(?:=|:=?)|&&|\|[|>]|<(?:<<?<?|--?!?|~~?!?|[|=?])?|>[>=?]?|-(?:->?|>)?|\+\+?|@@?|%%?|\*\*?|!(?:~?=|--?>|~?~>)?|~(?:~?>|=)?|==?|\^\^?|[\/?]/],punctuation:/[(){}\[\]|.,:;`]/},e.languages.livescript["interpolated-string"].inside.interpolation.inside.rest=e.languages.livescript}GS.displayName="llvm";GS.aliases=[];function GS(e){(function(t){t.languages.llvm={comment:/;.*/,string:{pattern:/"[^"]*"/,greedy:!0},boolean:/\b(?:false|true)\b/,variable:/[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,label:/(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,type:{pattern:/\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,alias:"class-name"},keyword:/\b[a-z_][a-z_0-9]*\b/,number:/[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,punctuation:/[{}[\];(),.!*=<>]/}})(e)}qS.displayName="log";qS.aliases=[];function qS(e){e.languages.log={string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,greedy:!0},exception:{pattern:/(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,lookbehind:!0,greedy:!0,alias:["javastacktrace","language-javastacktrace"],inside:e.languages.javastacktrace||{keyword:/\bat\b/,function:/[a-z_][\w$]*(?=\()/,punctuation:/[.:()]/}},level:[{pattern:/\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,alias:["error","important"]},{pattern:/\b(?:WARN|WARNING|WRN)\b/,alias:["warning","important"]},{pattern:/\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,alias:["info","keyword"]},{pattern:/\b(?:DBG|DEBUG|FINE)\b/,alias:["debug","keyword"]},{pattern:/\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB)\b/,alias:["trace","comment"]}],property:{pattern:/((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,lookbehind:!0},separator:{pattern:/(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,lookbehind:!0,alias:"comment"},url:/\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/,email:{pattern:/(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,lookbehind:!0,alias:"url"},"ip-address":{pattern:/\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/,alias:"constant"},"mac-address":{pattern:/\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,alias:"constant"},domain:{pattern:/(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,lookbehind:!0,alias:"constant"},uuid:{pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,alias:"constant"},hash:{pattern:/\b(?:[a-f0-9]{32}){1,2}\b/i,alias:"constant"},"file-path":{pattern:/\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,lookbehind:!0,greedy:!0,alias:"string"},date:{pattern:RegExp(/\b\d{4}[-/]\d{2}[-/]\d{2}(?:T(?=\d{1,2}:)|(?=\s\d{1,2}:))/.source+"|"+/\b\d{1,4}[-/ ](?:\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\d{2,4}T?\b/.source+"|"+/\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\s{1,2}\d{1,2}\b/.source,"i"),alias:"number"},time:{pattern:/\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,alias:"number"},boolean:/\b(?:false|null|true)\b/i,number:{pattern:/(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,lookbehind:!0},operator:/[;:?<=>~/@!$%&+\-|^(){}*#]/,punctuation:/[\[\].,]/}}WS.displayName="lolcode";WS.aliases=[];function WS(e){e.languages.lolcode={comment:[/\bOBTW\s[\s\S]*?\sTLDR\b/,/\bBTW.+/],string:{pattern:/"(?::.|[^":])*"/,inside:{variable:/:\{[^}]+\}/,symbol:[/:\([a-f\d]+\)/i,/:\[[^\]]+\]/,/:[)>o":]/]},greedy:!0},number:/(?:\B-)?(?:\b\d+(?:\.\d*)?|\B\.\d+)/,symbol:{pattern:/(^|\s)(?:A )?(?:BUKKIT|NOOB|NUMBAR|NUMBR|TROOF|YARN)(?=\s|,|$)/,lookbehind:!0,inside:{keyword:/A(?=\s)/}},label:{pattern:/((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,lookbehind:!0,alias:"string"},function:{pattern:/((?:^|\s)(?:HOW IZ I|I IZ|IZ) )[a-zA-Z]\w*/,lookbehind:!0},keyword:[{pattern:/(^|\s)(?:AN|FOUND YR|GIMMEH|GTFO|HAI|HAS A|HOW IZ I|I HAS A|I IZ|IF U SAY SO|IM IN YR|IM OUTTA YR|IS NOW(?: A)?|ITZ(?: A)?|IZ|KTHX|KTHXBYE|LIEK(?: A)?|MAEK|MEBBE|MKAY|NERFIN|NO WAI|O HAI IM|O RLY\?|OIC|OMG|OMGWTF|R|SMOOSH|SRS|TIL|UPPIN|VISIBLE|WILE|WTF\?|YA RLY|YR)(?=\s|,|$)/,lookbehind:!0},/'Z(?=\s|,|$)/],boolean:{pattern:/(^|\s)(?:FAIL|WIN)(?=\s|,|$)/,lookbehind:!0},variable:{pattern:/(^|\s)IT(?=\s|,|$)/,lookbehind:!0},operator:{pattern:/(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:ALL|ANY|BIGGR|BOTH|DIFF|EITHER|MOD|PRODUKT|QUOSHUNT|SMALLR|SUM|WON) OF)(?=\s|,|$)/,lookbehind:!0},punctuation:/\.{3}|…|,|!/}}VS.displayName="magma";VS.aliases=[];function VS(e){e.languages.magma={output:{pattern:/^(>.*(?:\r(?:\n|(?!\n))|\n))(?!>)(?:.+|(?:\r(?:\n|(?!\n))|\n)(?!>).*)(?:(?:\r(?:\n|(?!\n))|\n)(?!>).*)*/m,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/(^|[^\\"])"(?:[^\r\n\\"]|\\.)*"/,lookbehind:!0,greedy:!0},keyword:/\b(?:_|adj|and|assert|assert2|assert3|assigned|break|by|case|cat|catch|clear|cmpeq|cmpne|continue|declare|default|delete|diff|div|do|elif|else|end|eq|error|eval|exists|exit|for|forall|forward|fprintf|freeze|function|ge|gt|if|iload|import|in|intrinsic|is|join|le|load|local|lt|meet|mod|ne|not|notadj|notin|notsubset|or|print|printf|procedure|quit|random|read|readi|repeat|require|requirege|requirerange|restore|return|save|sdiff|select|subset|then|time|to|try|until|vprint|vprintf|vtime|when|where|while|xor)\b/,boolean:/\b(?:false|true)\b/,generator:{pattern:/\b[a-z_]\w*(?=\s*<)/i,alias:"class-name"},function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},operator:/->|[-+*/^~!|#=]|:=|\.\./,punctuation:/[()[\]{}<>,;.:]/}}eg.displayName="mata";eg.aliases=[];function eg(e){(function(t){var n=/\b(?:(?:col|row)?vector|matrix|scalar)\b/.source,s=/\bvoid\b|<org>|\b(?:complex|numeric|pointer(?:\s*\([^()]*\))?|real|string|(?:class|struct)\s+\w+|transmorphic)(?:\s*<org>)?/.source.replace(/<org>/g,n);t.languages.mata={comment:{pattern:/\/\/.*|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\//,greedy:!0},string:{pattern:/"[^"\r\n]*"|[‘`']".*?"[’`']/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|struct)\s+)\w+(?=\s*(?:\{|\bextends\b))/,lookbehind:!0},type:{pattern:RegExp(s),alias:"class-name",inside:{punctuation:/[()]/,keyword:/\b(?:class|function|struct|void)\b/}},keyword:/\b(?:break|class|continue|do|else|end|extends|external|final|for|function|goto|if|pragma|private|protected|public|return|static|struct|unset|unused|version|virtual|while)\b/,constant:/\bNULL\b/,number:{pattern:/(^|[^\w.])(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|\d[a-f0-9]*(?:\.[a-f0-9]+)?x[+-]?\d+)i?(?![\w.])/i,lookbehind:!0},missing:{pattern:/(^|[^\w.])(?:\.[a-z]?)(?![\w.])/,lookbehind:!0,alias:"symbol"},function:/\b[a-z_]\w*(?=\s*\()/i,operator:/\.\.|\+\+|--|&&|\|\||:?(?:[!=<>]=|[+\-*/^<>&|:])|[!?=\\#’`']/,punctuation:/[()[\]{},;.]/}})(e)}YS.displayName="matlab";YS.aliases=[];function YS(e){e.languages.matlab={comment:[/%\{[\s\S]*?\}%/,/%.+/],string:{pattern:/\B'(?:''|[^'\r\n])*'/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,keyword:/\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/,function:/\b(?!\d)\w+(?=\s*\()/,operator:/\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,punctuation:/\.{3}|[.,;\[\](){}!]/}}KS.displayName="maxscript";KS.aliases=[];function KS(e){(function(t){var n=/\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i;t.languages.maxscript={comment:{pattern:/\/\*[\s\S]*?(?:\*\/|$)|--.*/,greedy:!0},string:{pattern:/(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/,lookbehind:!0,greedy:!0},path:{pattern:/\$(?:[\w/\\.*?]|'[^']*')*/,greedy:!0,alias:"string"},"function-call":{pattern:RegExp("((?:"+(/^/.source+"|"+/[;=<>+\-*/^({\[]/.source+"|"+/\b(?:and|by|case|catch|collect|do|else|if|in|not|or|return|then|to|try|where|while|with)\b/.source)+")[ ]*)(?!"+n.source+")"+/[a-z_]\w*\b/.source+"(?=[ ]*(?:"+("(?!"+n.source+")"+/[a-z_]/.source+"|"+/\d|-\.?\d/.source+"|"+/[({'"$@#?]/.source)+"))","im"),lookbehind:!0,greedy:!0,alias:"function"},"function-definition":{pattern:/(\b(?:fn|function)\s+)\w+\b/i,lookbehind:!0,alias:"function"},argument:{pattern:/\b[a-z_]\w*(?=:)/i,alias:"attr-name"},keyword:n,boolean:/\b(?:false|true)\b/,time:{pattern:/(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/,lookbehind:!0,alias:"number"},number:[{pattern:/(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/,lookbehind:!0},/\b(?:e|pi)\b/],constant:/\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/,color:{pattern:/\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/i,alias:"constant"},operator:/[-+*/<>=!]=?|[&^?]|#(?!\()/,punctuation:/[()\[\]{}.:,;]|#(?=\()|\\$/m}})(e)}XS.displayName="mel";XS.aliases=[];function XS(e){e.languages.mel={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},code:{pattern:/`(?:\\.|[^\\`])*`/,greedy:!0,alias:"italic",inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},statement:{pattern:/[\s\S]+/,inside:null}}},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},variable:/\$\w+/,number:/\b0x[\da-fA-F]+\b|\b\d+(?:\.\d*)?|\B\.\d+/,flag:{pattern:/-[^\d\W]\w*/,alias:"operator"},keyword:/\b(?:break|case|continue|default|do|else|float|for|global|if|in|int|matrix|proc|return|string|switch|vector|while)\b/,function:{pattern:/((?:^|[{;])[ \t]*)[a-z_]\w*\b(?!\s*(?:\.(?!\.)|[[{=]))|\b[a-z_]\w*(?=[ \t]*\()/im,lookbehind:!0,greedy:!0},"tensor-punctuation":{pattern:/<<|>>/,alias:"punctuation"},operator:/\+[+=]?|-[-=]?|&&|\|\||[<>]=?|[*\/!=]=?|[%^]/,punctuation:/[.,:;?\[\](){}]/},e.languages.mel.code.inside.statement.inside=e.languages.mel}ZS.displayName="mermaid";ZS.aliases=[];function ZS(e){e.languages.mermaid={comment:{pattern:/%%.*/,greedy:!0},style:{pattern:/^([ \t]*(?:classDef|linkStyle|style)[ \t]+[\w$-]+[ \t]+)\w.*[^\s;]/m,lookbehind:!0,inside:{property:/\b\w[\w-]*(?=[ \t]*:)/,operator:/:/,punctuation:/,/}},"inter-arrow-label":{pattern:/([^<>ox.=-])(?:-[-.]|==)(?![<>ox.=-])[ \t]*(?:"[^"\r\n]*"|[^\s".=-](?:[^\r\n.=-]*[^\s.=-])?)[ \t]*(?:\.+->?|--+[->]|==+[=>])(?![<>ox.=-])/,lookbehind:!0,greedy:!0,inside:{arrow:{pattern:/(?:\.+->?|--+[->]|==+[=>])$/,alias:"operator"},label:{pattern:/^([\s\S]{2}[ \t]*)\S(?:[\s\S]*\S)?/,lookbehind:!0,alias:"property"},"arrow-head":{pattern:/^\S+/,alias:["arrow","operator"]}}},arrow:[{pattern:/(^|[^{}|o.-])[|}][|o](?:--|\.\.)[|o][|{](?![{}|o.-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>ox.=-])(?:[<ox](?:==+|--+|-\.*-)[>ox]?|(?:==+|--+|-\.*-)[>ox]|===+|---+|-\.+-)(?![<>ox.=-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>()x-])(?:--?(?:>>|[x>)])(?![<>()x])|(?:<<|[x<(])--?(?!-))/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>|*o.-])(?:[*o]--|--[*o]|<\|?(?:--|\.\.)|(?:--|\.\.)\|?>|--|\.\.)(?![<>|*o.-])/,lookbehind:!0,alias:"operator"}],label:{pattern:/(^|[^|<])\|(?:[^\r\n"|]|"[^"\r\n]*")+\|/,lookbehind:!0,greedy:!0,alias:"property"},text:{pattern:/(?:[(\[{]+|\b>)(?:[^\r\n"()\[\]{}]|"[^"\r\n]*")+(?:[)\]}]+|>)/,alias:"string"},string:{pattern:/"[^"\r\n]*"/,greedy:!0},annotation:{pattern:/<<(?:abstract|choice|enumeration|fork|interface|join|service)>>|\[\[(?:choice|fork|join)\]\]/i,alias:"important"},keyword:[{pattern:/(^[ \t]*)(?:action|callback|class|classDef|classDiagram|click|direction|erDiagram|flowchart|gantt|gitGraph|graph|journey|link|linkStyle|pie|requirementDiagram|sequenceDiagram|stateDiagram|stateDiagram-v2|style|subgraph)(?![\w$-])/m,lookbehind:!0,greedy:!0},{pattern:/(^[ \t]*)(?:activate|alt|and|as|autonumber|deactivate|else|end(?:[ \t]+note)?|loop|opt|par|participant|rect|state|note[ \t]+(?:over|(?:left|right)[ \t]+of))(?![\w$-])/im,lookbehind:!0,greedy:!0}],entity:/#[a-z0-9]+;/,operator:{pattern:/(\w[ \t]*)&(?=[ \t]*\w)|:::|:/,lookbehind:!0},punctuation:/[(){};]/}}QS.displayName="metafont";QS.aliases=[];function QS(e){e.languages.metafont={comment:{pattern:/%.*/,greedy:!0},string:{pattern:/"[^\r\n"]*"/,greedy:!0},number:/\d*\.?\d+/,boolean:/\b(?:false|true)\b/,punctuation:[/[,;()]/,{pattern:/(^|[^{}])(?:\{|\})(?![{}])/,lookbehind:!0},{pattern:/(^|[^[])\[(?!\[)/,lookbehind:!0},{pattern:/(^|[^\]])\](?!\])/,lookbehind:!0}],constant:[{pattern:/(^|[^!?])\?\?\?(?![!?])/,lookbehind:!0},{pattern:/(^|[^/*\\])(?:\\|\\\\)(?![/*\\])/,lookbehind:!0},/\b(?:_|blankpicture|bp|cc|cm|dd|ditto|down|eps|epsilon|fullcircle|halfcircle|identity|in|infinity|left|mm|nullpen|nullpicture|origin|pc|penrazor|penspeck|pensquare|penstroke|proof|pt|quartercircle|relax|right|smoke|unitpixel|unitsquare|up)\b/],quantity:{pattern:/\b(?:autorounding|blacker|boundarychar|charcode|chardp|chardx|chardy|charext|charht|charic|charwd|currentwindow|day|designsize|displaying|fillin|fontmaking|granularity|hppp|join_radius|month|o_correction|pausing|pen_(?:bot|lft|rt|top)|pixels_per_inch|proofing|showstopping|smoothing|time|tolerance|tracingcapsules|tracingchoices|tracingcommands|tracingedges|tracingequations|tracingmacros|tracingonline|tracingoutput|tracingpens|tracingrestores|tracingspecs|tracingstats|tracingtitles|turningcheck|vppp|warningcheck|xoffset|year|yoffset)\b/,alias:"keyword"},command:{pattern:/\b(?:addto|batchmode|charlist|cull|display|errhelp|errmessage|errorstopmode|everyjob|extensible|fontdimen|headerbyte|inner|interim|let|ligtable|message|newinternal|nonstopmode|numspecial|openwindow|outer|randomseed|save|scrollmode|shipout|show|showdependencies|showstats|showtoken|showvariable|special)\b/,alias:"builtin"},operator:[{pattern:/(^|[^>=<:|])(?:<|<=|=|=:|\|=:|\|=:>|=:\|>|=:\||\|=:\||\|=:\|>|\|=:\|>>|>|>=|:|:=|<>|::|\|\|:)(?![>=<:|])/,lookbehind:!0},{pattern:/(^|[^+-])(?:\+|\+\+|-{1,3}|\+-\+)(?![+-])/,lookbehind:!0},{pattern:/(^|[^/*\\])(?:\*|\*\*|\/)(?![/*\\])/,lookbehind:!0},{pattern:/(^|[^.])(?:\.{2,3})(?!\.)/,lookbehind:!0},{pattern:/(^|[^@#&$])&(?![@#&$])/,lookbehind:!0},/\b(?:and|not|or)\b/],macro:{pattern:/\b(?:abs|beginchar|bot|byte|capsule_def|ceiling|change_width|clear_pen_memory|clearit|clearpen|clearxy|counterclockwise|cullit|cutdraw|cutoff|decr|define_blacker_pixels|define_corrected_pixels|define_good_x_pixels|define_good_y_pixels|define_horizontal_corrected_pixels|define_pixels|define_whole_blacker_pixels|define_whole_pixels|define_whole_vertical_blacker_pixels|define_whole_vertical_pixels|dir|direction|directionpoint|div|dotprod|downto|draw|drawdot|endchar|erase|fill|filldraw|fix_units|flex|font_coding_scheme|font_extra_space|font_identifier|font_normal_shrink|font_normal_space|font_normal_stretch|font_quad|font_size|font_slant|font_x_height|gfcorners|gobble|gobbled|good\.(?:bot|lft|rt|top|x|y)|grayfont|hide|hround|imagerules|incr|interact|interpath|intersectionpoint|inverse|italcorr|killtext|labelfont|labels|lft|loggingall|lowres_fix|makegrid|makelabel(?:\.(?:bot|lft|rt|top)(?:\.nodot)?)?|max|min|mod|mode_def|mode_setup|nodisplays|notransforms|numtok|openit|penlabels|penpos|pickup|proofoffset|proofrule|proofrulethickness|range|reflectedabout|rotatedabout|rotatedaround|round|rt|savepen|screenchars|screenrule|screenstrokes|shipit|showit|slantfont|softjoin|solve|stop|superellipse|tensepath|thru|titlefont|top|tracingall|tracingnone|undraw|undrawdot|unfill|unfilldraw|upto|vround)\b/,alias:"function"},builtin:/\b(?:ASCII|angle|char|cosd|decimal|directiontime|floor|hex|intersectiontimes|jobname|known|length|makepath|makepen|mexp|mlog|normaldeviate|oct|odd|pencircle|penoffset|point|postcontrol|precontrol|reverse|rotated|sind|sqrt|str|subpath|substring|totalweight|turningnumber|uniformdeviate|unknown|xpart|xxpart|xypart|ypart|yxpart|yypart)\b/,keyword:/\b(?:also|at|atleast|begingroup|charexists|contour|controls|curl|cycle|def|delimiters|doublepath|dropping|dump|else|elseif|end|enddef|endfor|endgroup|endinput|exitif|exitunless|expandafter|fi|for|forever|forsuffixes|from|if|input|inwindow|keeping|kern|of|primarydef|quote|readstring|scaled|scantokens|secondarydef|shifted|skipto|slanted|step|tension|tertiarydef|to|transformed|until|vardef|withpen|withweight|xscaled|yscaled|zscaled)\b/,type:{pattern:/\b(?:boolean|expr|numeric|pair|path|pen|picture|primary|secondary|string|suffix|tertiary|text|transform)\b/,alias:"property"},variable:{pattern:/(^|[^@#&$])(?:@#|#@|#|@)(?![@#&$])|\b(?:aspect_ratio|currentpen|currentpicture|currenttransform|d|extra_beginchar|extra_endchar|extra_setup|h|localfont|mag|mode|screen_cols|screen_rows|w|whatever|x|y|z)\b/,lookbehind:!0}}}JS.displayName="mizar";JS.aliases=[];function JS(e){e.languages.mizar={comment:/::.+/,keyword:/@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|end|environ|equals|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:ies|y)|when|where|with|wrt)\b/,parameter:{pattern:/\$(?:10|\d)/,alias:"variable"},variable:/\b\w+(?=:)/,number:/(?:\b|-)\d+\b/,operator:/\.\.\.|->|&|\.?=/,punctuation:/\(#|#\)|[,:;\[\](){}]/}}e_.displayName="mongodb";e_.aliases=[];function e_(e){e.register(yr),(function(t){var n=["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$and","$not","$nor","$or","$exists","$type","$expr","$jsonSchema","$mod","$regex","$text","$where","$geoIntersects","$geoWithin","$near","$nearSphere","$all","$elemMatch","$size","$bitsAllClear","$bitsAllSet","$bitsAnyClear","$bitsAnySet","$comment","$elemMatch","$meta","$slice","$currentDate","$inc","$min","$max","$mul","$rename","$set","$setOnInsert","$unset","$addToSet","$pop","$pull","$push","$pullAll","$each","$position","$slice","$sort","$bit","$addFields","$bucket","$bucketAuto","$collStats","$count","$currentOp","$facet","$geoNear","$graphLookup","$group","$indexStats","$limit","$listLocalSessions","$listSessions","$lookup","$match","$merge","$out","$planCacheStats","$project","$redact","$replaceRoot","$replaceWith","$sample","$set","$skip","$sort","$sortByCount","$unionWith","$unset","$unwind","$setWindowFields","$abs","$accumulator","$acos","$acosh","$add","$addToSet","$allElementsTrue","$and","$anyElementTrue","$arrayElemAt","$arrayToObject","$asin","$asinh","$atan","$atan2","$atanh","$avg","$binarySize","$bsonSize","$ceil","$cmp","$concat","$concatArrays","$cond","$convert","$cos","$dateFromParts","$dateToParts","$dateFromString","$dateToString","$dayOfMonth","$dayOfWeek","$dayOfYear","$degreesToRadians","$divide","$eq","$exp","$filter","$first","$floor","$function","$gt","$gte","$hour","$ifNull","$in","$indexOfArray","$indexOfBytes","$indexOfCP","$isArray","$isNumber","$isoDayOfWeek","$isoWeek","$isoWeekYear","$last","$last","$let","$literal","$ln","$log","$log10","$lt","$lte","$ltrim","$map","$max","$mergeObjects","$meta","$min","$millisecond","$minute","$mod","$month","$multiply","$ne","$not","$objectToArray","$or","$pow","$push","$radiansToDegrees","$range","$reduce","$regexFind","$regexFindAll","$regexMatch","$replaceOne","$replaceAll","$reverseArray","$round","$rtrim","$second","$setDifference","$setEquals","$setIntersection","$setIsSubset","$setUnion","$size","$sin","$slice","$split","$sqrt","$stdDevPop","$stdDevSamp","$strcasecmp","$strLenBytes","$strLenCP","$substr","$substrBytes","$substrCP","$subtract","$sum","$switch","$tan","$toBool","$toDate","$toDecimal","$toDouble","$toInt","$toLong","$toObjectId","$toString","$toLower","$toUpper","$trim","$trunc","$type","$week","$year","$zip","$count","$dateAdd","$dateDiff","$dateSubtract","$dateTrunc","$getField","$rand","$sampleRate","$setField","$unsetField","$comment","$explain","$hint","$max","$maxTimeMS","$min","$orderby","$query","$returnKey","$showDiskLoc","$natural"],s=["ObjectId","Code","BinData","DBRef","Timestamp","NumberLong","NumberDecimal","MaxKey","MinKey","RegExp","ISODate","UUID"];n=n.map(function(o){return o.replace("$","\\$")});var a="(?:"+n.join("|")+")\\b";t.languages.mongodb=t.languages.extend("javascript",{}),t.languages.insertBefore("mongodb","string",{property:{pattern:/(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)(?=\s*:)/,greedy:!0,inside:{keyword:RegExp(`^(['"])?`+a+"(?:\\1)?$")}}}),t.languages.mongodb.string.inside={url:{pattern:/https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i,greedy:!0},entity:{pattern:/\b(?:(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d\d?|2[0-4]\d|25[0-5])\b/,greedy:!0}},t.languages.insertBefore("mongodb","constant",{builtin:{pattern:RegExp("\\b(?:"+s.join("|")+")\\b"),alias:"keyword"}})})(e)}t_.displayName="monkey";t_.aliases=[];function t_(e){e.languages.monkey={comment:{pattern:/^#Rem\s[\s\S]*?^#End|'.+/im,greedy:!0},string:{pattern:/"[^"\r\n]*"/,greedy:!0},preprocessor:{pattern:/(^[ \t]*)#.+/m,lookbehind:!0,greedy:!0,alias:"property"},function:/\b\w+(?=\()/,"type-char":{pattern:/\b[?%#$]/,alias:"class-name"},number:{pattern:/((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,lookbehind:!0},keyword:/\b(?:Abstract|Array|Bool|Case|Catch|Class|Const|Continue|Default|Eachin|Else|ElseIf|End|EndIf|Exit|Extends|Extern|False|Field|Final|Float|For|Forever|Function|Global|If|Implements|Import|Inline|Int|Interface|Local|Method|Module|New|Next|Null|Object|Private|Property|Public|Repeat|Return|Select|Self|Step|Strict|String|Super|Then|Throw|To|True|Try|Until|Void|Wend|While)\b/i,operator:/\.\.|<[=>]?|>=?|:?=|(?:[+\-*\/&~|]|\b(?:Mod|Shl|Shr)\b)=?|\b(?:And|Not|Or)\b/i,punctuation:/[.,:;()\[\]]/}}n_.displayName="moonscript";n_.aliases=["moon"];function n_(e){e.languages.moonscript={comment:/--.*/,string:[{pattern:/'[^']*'|\[(=*)\[[\s\S]*?\]\1\]/,greedy:!0},{pattern:/"[^"]*"/,greedy:!0,inside:{interpolation:{pattern:/#\{[^{}]*\}/,inside:{moonscript:{pattern:/(^#\{)[\s\S]+(?=\})/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/#\{|\}/,alias:"punctuation"}}}}}],"class-name":[{pattern:/(\b(?:class|extends)[ \t]+)\w+/,lookbehind:!0},/\b[A-Z]\w*/],keyword:/\b(?:class|continue|do|else|elseif|export|extends|for|from|if|import|in|local|nil|return|self|super|switch|then|unless|using|when|while|with)\b/,variable:/@@?\w*/,property:{pattern:/\b(?!\d)\w+(?=:)|(:)(?!\d)\w+/,lookbehind:!0},function:{pattern:/\b(?:_G|_VERSION|assert|collectgarbage|coroutine\.(?:create|resume|running|status|wrap|yield)|debug\.(?:debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)|dofile|error|getfenv|getmetatable|io\.(?:close|flush|input|lines|open|output|popen|read|stderr|stdin|stdout|tmpfile|type|write)|ipairs|load|loadfile|loadstring|math\.(?:abs|acos|asin|atan|atan2|ceil|cos|cosh|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pi|pow|rad|random|randomseed|sin|sinh|sqrt|tan|tanh)|module|next|os\.(?:clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(?:cpath|loaded|loadlib|path|preload|seeall)|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|string\.(?:byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)|table\.(?:concat|insert|maxn|remove|sort)|tonumber|tostring|type|unpack|xpcall)\b/,inside:{punctuation:/\./}},boolean:/\b(?:false|true)\b/,number:/(?:\B\.\d+|\b\d+\.\d+|\b\d+(?=[eE]))(?:[eE][-+]?\d+)?\b|\b(?:0x[a-fA-F\d]+|\d+)(?:U?LL)?\b/,operator:/\.{3}|[-=]>|~=|(?:[-+*/%<>!=]|\.\.)=?|[:#^]|\b(?:and|or)\b=?|\b(?:not)\b/,punctuation:/[.,()[\]{}\\]/},e.languages.moonscript.string[1].inside.interpolation.inside.moonscript.inside=e.languages.moonscript,e.languages.moon=e.languages.moonscript}r_.displayName="n1ql";r_.aliases=[];function r_(e){e.languages.n1ql={comment:{pattern:/\/\*[\s\S]*?(?:$|\*\/)|--.*/,greedy:!0},string:{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/,greedy:!0},identifier:{pattern:/`(?:\\[\s\S]|[^\\`]|``)*`/,greedy:!0},parameter:/\$[\w.]+/,keyword:/\b(?:ADVISE|ALL|ALTER|ANALYZE|AS|ASC|AT|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|COMMITTED|CONNECT|CONTINUE|CORRELATE|CORRELATED|COVER|CREATE|CURRENT|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FILTER|FLATTEN|FLUSH|FOLLOWING|FOR|FORCE|FROM|FTS|FUNCTION|GOLANG|GRANT|GROUP|GROUPS|GSI|HASH|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|ISOLATION|JAVASCRIPT|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LANGUAGE|LAST|LEFT|LET|LETTING|LEVEL|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NL|NO|NTH_VALUE|NULL|NULLS|NUMBER|OBJECT|OFFSET|ON|OPTION|OPTIONS|ORDER|OTHERS|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PRECEDING|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROBE|PROCEDURE|PUBLIC|RANGE|RAW|REALM|REDUCE|RENAME|RESPECT|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|ROW|ROWS|SATISFIES|SAVEPOINT|SCHEMA|SCOPE|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TIES|TO|TRAN|TRANSACTION|TRIGGER|TRUNCATE|UNBOUNDED|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WINDOW|WITH|WORK|XOR)\b/i,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:FALSE|TRUE)\b/i,number:/(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i,punctuation:/[;[\](),.{}:]/}}s_.displayName="nand2tetris-hdl";s_.aliases=[];function s_(e){e.languages["nand2tetris-hdl"]={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,keyword:/\b(?:BUILTIN|CHIP|CLOCKED|IN|OUT|PARTS)\b/,boolean:/\b(?:false|true)\b/,function:/\b[A-Za-z][A-Za-z0-9]*(?=\()/,number:/\b\d+\b/,operator:/=|\.\./,punctuation:/[{}[\];(),:]/}}a_.displayName="naniscript";a_.aliases=["nani"];function a_(e){(function(t){var n=/\{[^\r\n\[\]{}]*\}/,s={"quoted-string":{pattern:/"(?:[^"\\]|\\.)*"/,alias:"operator"},"command-param-id":{pattern:/(\s)\w+:/,lookbehind:!0,alias:"property"},"command-param-value":[{pattern:n,alias:"selector"},{pattern:/([\t ])\S+/,lookbehind:!0,greedy:!0,alias:"operator"},{pattern:/\S(?:.*\S)?/,alias:"operator"}]};t.languages.naniscript={comment:{pattern:/^([\t ]*);.*/m,lookbehind:!0},define:{pattern:/^>.+/m,alias:"tag",inside:{value:{pattern:/(^>\w+[\t ]+)(?!\s)[^{}\r\n]+/,lookbehind:!0,alias:"operator"},key:{pattern:/(^>)\w+/,lookbehind:!0}}},label:{pattern:/^([\t ]*)#[\t ]*\w+[\t ]*$/m,lookbehind:!0,alias:"regex"},command:{pattern:/^([\t ]*)@\w+(?=[\t ]|$).*/m,lookbehind:!0,alias:"function",inside:{"command-name":/^@\w+/,expression:{pattern:n,greedy:!0,alias:"selector"},"command-params":{pattern:/\s*\S[\s\S]*/,inside:s}}},"generic-text":{pattern:/(^[ \t]*)[^#@>;\s].*/m,lookbehind:!0,alias:"punctuation",inside:{"escaped-char":/\\[{}\[\]"]/,expression:{pattern:n,greedy:!0,alias:"selector"},"inline-command":{pattern:/\[[\t ]*\w[^\r\n\[\]]*\]/,greedy:!0,alias:"function",inside:{"command-params":{pattern:/(^\[[\t ]*\w+\b)[\s\S]+(?=\]$)/,lookbehind:!0,inside:s},"command-param-name":{pattern:/^(\[[\t ]*)\w+/,lookbehind:!0,alias:"name"},"start-stop-char":/[\[\]]/}}}}},t.languages.nani=t.languages.naniscript,t.hooks.add("after-tokenize",function(u){var c=u.tokens;c.forEach(function(d){if(typeof d!="string"&&d.type==="generic-text"){var h=o(d);a(h)||(d.type="bad-line",d.content=h)}})});function a(u){for(var c="[]{}",d=[],h=0;h<u.length;h++){var p=u[h],m=c.indexOf(p);if(m!==-1){if(m%2===0)d.push(m+1);else if(d.pop()!==m)return!1}}return d.length===0}function o(u){return typeof u=="string"?u:Array.isArray(u)?u.map(o).join(""):o(u.content)}})(e)}i_.displayName="nasm";i_.aliases=[];function i_(e){e.languages.nasm={comment:/;.*$/m,string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,label:{pattern:/(^\s*)[A-Za-z._?$][\w.?$@~#]*:/m,lookbehind:!0,alias:"function"},keyword:[/\[?BITS (?:16|32|64)\]?/,{pattern:/(^\s*)section\s*[a-z.]+:?/im,lookbehind:!0},/(?:extern|global)[^;\r\n]*/i,/(?:CPU|DEFAULT|FLOAT).*$/m],register:{pattern:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s)\b/i,alias:"variable"},number:/(?:\b|(?=\$))(?:0[hx](?:\.[\da-f]+|[\da-f]+(?:\.[\da-f]+)?)(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-\/%<>=&|$!]/}}o_.displayName="neon";o_.aliases=[];function o_(e){e.languages.neon={comment:{pattern:/#.*/,greedy:!0},datetime:{pattern:/(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/,lookbehind:!0,alias:"number"},key:{pattern:/(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,lookbehind:!0,alias:"property"},number:{pattern:/(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+(?:\.\d*)?|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/,lookbehind:!0},boolean:{pattern:/(^|[[{(=:,\s])(?:false|no|true|yes)(?=$|[\]}),:=\s])/i,lookbehind:!0},null:{pattern:/(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i,lookbehind:!0,alias:"keyword"},string:{pattern:/(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^\\"\r\n])*")/,lookbehind:!0,greedy:!0},literal:{pattern:/(^|[[{(=:,\s])(?:[^#"',:=[\]{}()\s`-]|[:-][^"',=[\]{}()\s])(?:[^,:=\]})(\s]|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/,lookbehind:!0,alias:"string"},punctuation:/[,:=[\]{}()-]/}}l_.displayName="nevod";l_.aliases=[];function l_(e){e.languages.nevod={comment:/\/\/.*|(?:\/\*[\s\S]*?(?:\*\/|$))/,string:{pattern:/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))!?\*?/,greedy:!0,inside:{"string-attrs":/!$|!\*$|\*$/}},namespace:{pattern:/(@namespace\s+)[a-zA-Z0-9\-.]+(?=\s*\{)/,lookbehind:!0},pattern:{pattern:/(@pattern\s+)?#?[a-zA-Z0-9\-.]+(?:\s*\(\s*(?:~\s*)?[a-zA-Z0-9\-.]+\s*(?:,\s*(?:~\s*)?[a-zA-Z0-9\-.]*)*\))?(?=\s*=)/,lookbehind:!0,inside:{"pattern-name":{pattern:/^#?[a-zA-Z0-9\-.]+/,alias:"class-name"},fields:{pattern:/\(.*\)/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},punctuation:/[,()]/,operator:{pattern:/~/,alias:"field-hidden-mark"}}}}},search:{pattern:/(@search\s+|#)[a-zA-Z0-9\-.]+(?:\.\*)?(?=\s*;)/,alias:"function",lookbehind:!0},keyword:/@(?:having|inside|namespace|outside|pattern|require|search|where)\b/,"standard-pattern":{pattern:/\b(?:Alpha|AlphaNum|Any|Blank|End|LineBreak|Num|NumAlpha|Punct|Space|Start|Symbol|Word|WordBreak)\b(?:\([a-zA-Z0-9\-.,\s+]*\))?/,inside:{"standard-pattern-name":{pattern:/^[a-zA-Z0-9\-.]+/,alias:"builtin"},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},"standard-pattern-attr":{pattern:/[a-zA-Z0-9\-.]+/,alias:"builtin"},punctuation:/[,()]/}},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},operator:[{pattern:/=/,alias:"pattern-def"},{pattern:/&/,alias:"conjunction"},{pattern:/~/,alias:"exception"},{pattern:/\?/,alias:"optionality"},{pattern:/[[\]]/,alias:"repetition"},{pattern:/[{}]/,alias:"variation"},{pattern:/[+_]/,alias:"sequence"},{pattern:/\.{2,3}/,alias:"span"}],"field-capture":[{pattern:/([a-zA-Z0-9\-.]+\s*\()\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+(?:\s*,\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+)*(?=\s*\))/,lookbehind:!0,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}},{pattern:/[a-zA-Z0-9\-.]+\s*:/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}}],punctuation:/[:;,()]/,name:/[a-zA-Z0-9\-.]+/}}c_.displayName="nginx";c_.aliases=[];function c_(e){(function(t){var n=/\$(?:\w[a-z\d]*(?:_[^\x00-\x1F\s"'\\()$]*)?|\{[^}\s"'\\]+\})/i;t.languages.nginx={comment:{pattern:/(^|[\s{};])#.*/,lookbehind:!0,greedy:!0},directive:{pattern:/(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:{string:{pattern:/((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,lookbehind:!0,greedy:!0,inside:{escape:{pattern:/\\["'\\nrt]/,alias:"entity"},variable:n}},comment:{pattern:/(\s)#.*/,lookbehind:!0,greedy:!0},keyword:{pattern:/^\S+/,greedy:!0},boolean:{pattern:/(\s)(?:off|on)(?!\S)/,lookbehind:!0},number:{pattern:/(\s)\d+[a-z]*(?!\S)/i,lookbehind:!0},variable:n}},punctuation:/[{};]/}})(e)}u_.displayName="nim";u_.aliases=[];function u_(e){e.languages.nim={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(?:\b(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")/,greedy:!0},char:{pattern:/'(?:\\(?:\d+|x[\da-fA-F]{0,2}|.)|[^'])'/,greedy:!0},function:{pattern:/(?:(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/,greedy:!0,inside:{operator:/\*$/}},identifier:{pattern:/`[^`\r\n]+`/,greedy:!0,inside:{punctuation:/`/}},number:/\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/,keyword:/\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/,operator:{pattern:/(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|in|is|isnot|mod|not|notin|of|or|shl|shr|xor)\b)/m,lookbehind:!0},punctuation:/[({\[]\.|\.[)}\]]|[`(){}\[\],:]/}}d_.displayName="nix";d_.aliases=[];function d_(e){e.languages.nix={comment:{pattern:/\/\*[\s\S]*?\*\/|#.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:null}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"important"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},e.languages.nix.string.inside.interpolation.inside=e.languages.nix}h_.displayName="nsis";h_.aliases=[];function h_(e){e.languages.nsis={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|[#;].*)/,lookbehind:!0,greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:{pattern:/(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|KnownFolderPath|LabelAddress|TempFileName|WinVer)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|RtlLanguage|ShellVarContextAll|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|Target|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,lookbehind:!0},property:/\b(?:ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY|admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user)\b/,constant:/\$\{[!\w\.:\^-]+\}|\$\([!\w\.:\^-]+\)/,variable:/\$\w[\w\.]*/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|\+\+?|<=?|>=?|==?=?|&&?|\|\|?|[?*\/~^%]/,punctuation:/[{}[\];(),.:]/,important:{pattern:/(^[\t ]*)!(?:addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|verbose|warning)\b/im,lookbehind:!0}}}f_.displayName="ocaml";f_.aliases=[];function f_(e){e.languages.ocaml={comment:{pattern:/\(\*[\s\S]*?\*\)/,greedy:!0},char:{pattern:/'(?:[^\\\r\n']|\\(?:.|[ox]?[0-9a-f]{1,3}))'/i,greedy:!0},string:[{pattern:/"(?:\\(?:[\s\S]|\r\n)|[^\\\r\n"])*"/,greedy:!0},{pattern:/\{([a-z_]*)\|[\s\S]*?\|\1\}/,greedy:!0}],number:[/\b(?:0b[01][01_]*|0o[0-7][0-7_]*)\b/i,/\b0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]*)?(?:p[+-]?\d[\d_]*)?(?!\w)/i,/\b\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?\d[\d_]*)?(?!\w)/i],directive:{pattern:/\B#\w+/,alias:"property"},label:{pattern:/\B~\w+/,alias:"property"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"symbol"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,"operator-like-punctuation":{pattern:/\[[<>|]|[>|]\]|\{<|>\}/,alias:"punctuation"},operator:/\.[.~]|:[=>]|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/;;|::|[(){}\[\].,:;#]|\b_\b/}}p_.displayName="odin";p_.aliases=[];function p_(e){(function(t){var n=/\\(?:["'\\abefnrtv]|0[0-7]{2}|U[\dA-Fa-f]{6}|u[\dA-Fa-f]{4}|x[\dA-Fa-f]{2})/;t.languages.odin={comment:[{pattern:/\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:\*(?!\/)|[^*])*(?:\*\/|$))*(?:\*\/|$)/,greedy:!0},{pattern:/#![^\n\r]*/,greedy:!0},{pattern:/\/\/[^\n\r]*/,greedy:!0}],char:{pattern:/'(?:\\(?:.|[0Uux][0-9A-Fa-f]{1,6})|[^\n\r'\\])'/,greedy:!0,inside:{symbol:n}},string:[{pattern:/`[^`]*`/,greedy:!0},{pattern:/"(?:\\.|[^\n\r"\\])*"/,greedy:!0,inside:{symbol:n}}],directive:{pattern:/#\w+/,alias:"property"},number:/\b0(?:b[01_]+|d[\d_]+|h_*(?:(?:(?:[\dA-Fa-f]_*){8}){1,2}|(?:[\dA-Fa-f]_*){4})|o[0-7_]+|x[\dA-F_a-f]+|z[\dAB_ab]+)\b|(?:\b\d+(?:\.(?!\.)\d*)?|\B\.\d+)(?:[Ee][+-]?\d*)?[ijk]?(?!\w)/,discard:{pattern:/\b_\b/,alias:"keyword"},"procedure-definition":{pattern:/\b\w+(?=[ \t]*(?::\s*){2}proc\b)/,alias:"function"},keyword:/\b(?:asm|auto_cast|bit_set|break|case|cast|context|continue|defer|distinct|do|dynamic|else|enum|fallthrough|for|foreign|if|import|in|map|matrix|not_in|or_else|or_return|package|proc|return|struct|switch|transmute|typeid|union|using|when|where)\b/,"procedure-name":{pattern:/\b\w+(?=[ \t]*\()/,alias:"function"},boolean:/\b(?:false|nil|true)\b/,"constant-parameter-sign":{pattern:/\$/,alias:"important"},undefined:{pattern:/---/,alias:"operator"},arrow:{pattern:/->/,alias:"punctuation"},operator:/\+\+|--|\.\.[<=]?|(?:&~|[-!*+/=~]|[%&<>|]{1,2})=?|[?^]/,punctuation:/[(),.:;@\[\]{}]/}})(e)}m_.displayName="opencl";m_.aliases=[];function m_(e){e.register(zs),(function(t){t.languages.opencl=t.languages.extend("c",{keyword:/\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,boolean:/\b(?:false|true)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:2|10)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/,alias:"constant"}}),t.languages.insertBefore("opencl","class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|intptr_t|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|uintptr_t)\b/,alias:"keyword"}});var n={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:FALSE|TRUE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};t.languages.insertBefore("c","keyword",n),t.languages.cpp&&(n["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|Sampler|UserEvent)\b/,alias:"keyword"},t.languages.insertBefore("cpp","keyword",n))})(e)}g_.displayName="openqasm";g_.aliases=["qasm"];function g_(e){e.languages.openqasm={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"[^"\r\n\t]*"|'[^'\r\n\t]*'/,greedy:!0},keyword:/\b(?:CX|OPENQASM|U|barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while)\b|#pragma\b/,"class-name":/\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,function:/\b(?:cos|exp|ln|popcount|rotl|rotr|sin|sqrt|tan)\b(?=\s*\()/,constant:/\b(?:euler|pi|tau)\b|π|𝜏|ℇ/,number:{pattern:/(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i,lookbehind:!0},operator:/->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,punctuation:/[(){}\[\];,:.]/},e.languages.qasm=e.languages.openqasm}b_.displayName="oz";b_.aliases=[];function b_(e){e.languages.oz={comment:{pattern:/\/\*[\s\S]*?\*\/|%.*/,greedy:!0},string:{pattern:/"(?:[^"\\]|\\[\s\S])*"/,greedy:!0},atom:{pattern:/'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,alias:"builtin"},keyword:/\$|\[\]|\b(?:_|at|attr|case|catch|choice|class|cond|declare|define|dis|else(?:case|if)?|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|nil|not|of|or|prepare|proc|prop|raise|require|self|skip|then|thread|true|try|unit)\b/,function:[/\b[a-z][A-Za-z\d]*(?=\()/,{pattern:/(\{)[A-Z][A-Za-z\d]*\b/,lookbehind:!0}],number:/\b(?:0[bx][\da-f]+|\d+(?:\.\d*)?(?:e~?\d+)?)\b|&(?:[^\\]|\\(?:\d{3}|.))/i,variable:/`(?:[^`\\]|\\.)+`/,"attr-name":/\b\w+(?=[ \t]*:(?![:=]))/,operator:/:(?:=|::?)|<[-:=]?|=(?:=|<?:?)|>=?:?|\\=:?|!!?|[|#+\-*\/,~^@]|\b(?:andthen|div|mod|orelse)\b/,punctuation:/[\[\](){}.:;?]/}}x_.displayName="parigp";x_.aliases=[];function x_(e){e.languages.parigp={comment:/\/\*[\s\S]*?\*\/|\\\\.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"/,greedy:!0},keyword:(function(){var t=["breakpoint","break","dbg_down","dbg_err","dbg_up","dbg_x","forcomposite","fordiv","forell","forpart","forprime","forstep","forsubgroup","forvec","for","iferr","if","local","my","next","return","until","while"];return t=t.map(function(n){return n.split("").join(" *")}).join("|"),RegExp("\\b(?:"+t+")\\b")})(),function:/\b\w(?:[\w ]*\w)?(?= *\()/,number:{pattern:/((?:\. *\. *)?)(?:\b\d(?: *\d)*(?: *(?!\. *\.)\.(?: *\d)*)?|\. *\d(?: *\d)*)(?: *e *(?:[+-] *)?\d(?: *\d)*)?/i,lookbehind:!0},operator:/\. *\.|[*\/!](?: *=)?|%(?: *=|(?: *#)?(?: *')*)?|\+(?: *[+=])?|-(?: *[-=>])?|<(?: *>|(?: *<)?(?: *=)?)?|>(?: *>)?(?: *=)?|=(?: *=){0,2}|\\(?: *\/)?(?: *=)?|&(?: *&)?|\| *\||['#~^]/,punctuation:/[\[\]{}().,:;|]/}}v_.displayName="parser";v_.aliases=[];function v_(e){e.register(ur),(function(t){var n=t.languages.parser=t.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/});n=t.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:n.keyword,variable:n.variable,function:n.function,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:n.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:n.punctuation}}}),t.languages.insertBefore("inside","punctuation",{expression:n.expression,keyword:n.keyword,variable:n.variable,function:n.function,escape:n.escape,"parser-punctuation":{pattern:n.punctuation,alias:"punctuation"}},n.tag.inside["attr-value"])})(e)}y_.displayName="pascal";y_.aliases=["objectpascal"];function y_(e){e.languages.pascal={directive:{pattern:/\{\$[\s\S]*?\}/,greedy:!0,alias:["marco","property"]},comment:{pattern:/\(\*[\s\S]*?\*\)|\{[\s\S]*?\}|\/\/.*/,greedy:!0},string:{pattern:/(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},asm:{pattern:/(\basm\b)[\s\S]+?(?=\bend\s*[;[])/i,lookbehind:!0,greedy:!0,inside:null},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},e.languages.pascal.asm.inside=e.languages.extend("pascal",{asm:void 0,keyword:void 0,operator:void 0}),e.languages.objectpascal=e.languages.pascal}E_.displayName="pascaligo";E_.aliases=[];function E_(e){(function(t){var n=/\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\)/.source,s=/(?:\b\w+(?:<braces>)?|<braces>)/.source.replace(/<braces>/g,function(){return n}),a=t.languages.pascaligo={comment:/\(\*[\s\S]+?\*\)|\/\/.*/,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,greedy:!0},"class-name":[{pattern:RegExp(/(\btype\s+\w+\s+is\s+)<type>/.source.replace(/<type>/g,function(){return s}),"i"),lookbehind:!0,inside:null},{pattern:RegExp(/<type>(?=\s+is\b)/.source.replace(/<type>/g,function(){return s}),"i"),inside:null},{pattern:RegExp(/(:\s*)<type>/.source.replace(/<type>/g,function(){return s})),lookbehind:!0,inside:null}],keyword:{pattern:/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,lookbehind:!0},boolean:{pattern:/(^|[^&])\b(?:False|True)\b/i,lookbehind:!0},builtin:{pattern:/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,lookbehind:!0},function:/\b\w+(?=\s*\()/,number:[/%[01]+|&[0-7]+|\$[a-f\d]+/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],operator:/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,punctuation:/\(\.|\.\)|[()\[\]:;,.{}]/},o=["comment","keyword","builtin","operator","punctuation"].reduce(function(u,c){return u[c]=a[c],u},{});a["class-name"].forEach(function(u){u.inside=o})})(e)}S_.displayName="psl";S_.aliases=[];function S_(e){e.languages.psl={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0,inside:{symbol:/\\[ntrbA-Z"\\]/}},"heredoc-string":{pattern:/<<<([a-zA-Z_]\w*)[\r\n](?:.*[\r\n])*?\1\b/,alias:"string",greedy:!0},keyword:/\b(?:__multi|__single|case|default|do|else|elsif|exit|export|for|foreach|function|if|last|line|local|next|requires|return|switch|until|while|word)\b/,constant:/\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SEP_HORIZ|R_SEP_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|VOID|WARN)\b/,boolean:/\b(?:FALSE|False|NO|No|TRUE|True|YES|Yes|false|no|true|yes)\b/,variable:/\b(?:PslDebug|errno|exit_status)\b/,builtin:{pattern:/\b(?:PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|_snmp_debug|acos|add_diary|annotate|annotate_get|ascii_to_ebcdic|asctime|asin|atan|atexit|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|date|dcget_text|destroy|destroy_lock|dget_text|difference|dump_hist|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|file|floor|fmod|fopen|fseek|ftell|full_discovery|get|get_chan_info|get_ranges|get_text|get_vars|getenv|gethostinfo|getpid|getpname|grep|history|history_get_retention|in_transition|index|int|internal|intersection|is_var|isnumber|join|kill|length|lines|lock|lock_info|log|log10|loge|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|nthargf|nthline|nthlinef|num_bytes|num_consoles|pconfig|popen|poplines|pow|print|printf|proc_exists|process|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|snmp_agent_config|snmp_agent_start|snmp_agent_stop|snmp_close|snmp_config|snmp_get|snmp_get_next|snmp_h_get|snmp_h_get_next|snmp_h_set|snmp_open|snmp_set|snmp_trap_ignore|snmp_trap_listen|snmp_trap_raise_std_trap|snmp_trap_receive|snmp_trap_register_im|snmp_trap_send|snmp_walk|sopen|sort|splitline|sprintf|sqrt|srandom|str_repeat|strcasecmp|subset|substr|system|tail|tan|tanh|text_domain|time|tmpnam|tolower|toupper|trace_psl_process|trim|union|unique|unlock|unset|va_arg|va_start|write)\b/,alias:"builtin-function"},"foreach-variable":{pattern:/(\bforeach\s+(?:(?:\w+\b|"(?:\\.|[^\\"])*")\s+){0,2})[_a-zA-Z]\w*(?=\s*\()/,lookbehind:!0,greedy:!0},function:/\b[_a-z]\w*\b(?=\s*\()/i,number:/\b(?:0x[0-9a-f]+|\d+(?:\.\d+)?)\b/i,operator:/--|\+\+|&&=?|\|\|=?|<<=?|>>=?|[=!]~|[-+*/%&|^!=<>]=?|\.|[:?]/,punctuation:/[(){}\[\];,]/}}__.displayName="pcaxis";__.aliases=["px"];function __(e){e.languages.pcaxis={string:/"[^"]*"/,keyword:{pattern:/((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,lookbehind:!0,greedy:!0,inside:{keyword:/^[-A-Z\d]+/,language:{pattern:/^(\s*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/^\[|\]$/,property:/[-\w]+/}},"sub-key":{pattern:/^(\s*)\S[\s\S]*/,lookbehind:!0,inside:{parameter:{pattern:/"[^"]*"/,alias:"property"},punctuation:/^\(|\)$|,/}}}},operator:/=/,tlist:{pattern:/TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,greedy:!0,inside:{function:/^TLIST/,property:{pattern:/^(\s*\(\s*)\w+/,lookbehind:!0},string:/"[^"]*"/,punctuation:/[(),]/,operator:/-/}},punctuation:/[;,]/,number:{pattern:/(^|\s)\d+(?:\.\d+)?(?!\S)/,lookbehind:!0},boolean:/NO|YES/},e.languages.px=e.languages.pcaxis}w_.displayName="peoplecode";w_.aliases=["pcode"];function w_(e){e.languages.peoplecode={comment:RegExp([/\/\*[\s\S]*?\*\//.source,/\bREM[^;]*;/.source,/<\*(?:[^<*]|\*(?!>)|<(?!\*)|<\*(?:(?!\*>)[\s\S])*\*>)*\*>/.source,/\/\+[\s\S]*?\+\//.source].join("|")),string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},variable:/%\w+/,"function-definition":{pattern:/((?:^|[^\w-])(?:function|method)\s+)\w+/i,lookbehind:!0,alias:"function"},"class-name":{pattern:/((?:^|[^-\w])(?:as|catch|class|component|create|extends|global|implements|instance|local|of|property|returns)\s+)\w+(?::\w+)*/i,lookbehind:!0,inside:{punctuation:/:/}},keyword:/\b(?:abstract|alias|as|catch|class|component|constant|create|declare|else|end-(?:class|evaluate|for|function|get|if|method|set|try|while)|evaluate|extends|for|function|get|global|if|implements|import|instance|library|local|method|null|of|out|peopleCode|private|program|property|protected|readonly|ref|repeat|returns?|set|step|then|throw|to|try|until|value|when(?:-other)?|while)\b/i,"operator-keyword":{pattern:/\b(?:and|not|or)\b/i,alias:"operator"},function:/[_a-z]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/\b\d+(?:\.\d+)?\b/,operator:/<>|[<>]=?|!=|\*\*|[-+*/|=@]/,punctuation:/[:.;,()[\]]/},e.languages.pcode=e.languages.peoplecode}C_.displayName="phpdoc";C_.aliases=[];function C_(e){e.register(Dc),e.register(Lo),(function(t){var n=/(?:\b[a-zA-Z]\w*|[|\\[\]])+/.source;t.languages.phpdoc=t.languages.extend("javadoclike",{parameter:{pattern:RegExp("(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:"+n+"\\s+)?)\\$\\w+"),lookbehind:!0}}),t.languages.insertBefore("phpdoc","keyword",{"class-name":[{pattern:RegExp("(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)"+n),lookbehind:!0,inside:{keyword:/\b(?:array|bool|boolean|callback|double|false|float|int|integer|mixed|null|object|resource|self|string|true|void)\b/,punctuation:/[|\\[\]()]/}}]}),t.languages.javadoclike.addSupport("php",t.languages.phpdoc)})(e)}N_.displayName="php-extras";N_.aliases=[];function N_(e){e.register(Lo),e.languages.insertBefore("php","variable",{this:{pattern:/\$this\b/,alias:"keyword"},global:/\$(?:GLOBALS|HTTP_RAW_POST_DATA|_(?:COOKIE|ENV|FILES|GET|POST|REQUEST|SERVER|SESSION)|argc|argv|http_response_header|php_errormsg)\b/,scope:{pattern:/\b[\w\\]+::/,inside:{keyword:/\b(?:parent|self|static)\b/,punctuation:/::|\\/}}})}T_.displayName="plant-uml";T_.aliases=["plantuml"];function T_(e){(function(t){var n=/\$\w+|%[a-z]+%/,s=/\[[^[\]]*\]/.source,a=/(?:[drlu]|do|down|le|left|ri|right|up)/.source,o="(?:-+"+a+"-+|\\.+"+a+"\\.+|-+(?:"+s+"-*)?|"+s+"-+|\\.+(?:"+s+"\\.*)?|"+s+"\\.+)",u=/(?:<{1,2}|\/{1,2}|\\{1,2}|<\||[#*^+}xo])/.source,c=/(?:>{1,2}|\/{1,2}|\\{1,2}|\|>|[#*^+{xo])/.source,d=/[[?]?[ox]?/.source,h=/[ox]?[\]?]?/.source,p=d+"(?:"+o+c+"|"+u+o+"(?:"+c+")?)"+h;t.languages["plant-uml"]={comment:{pattern:/(^[ \t]*)(?:'.*|\/'[\s\S]*?'\/)/m,lookbehind:!0,greedy:!0},preprocessor:{pattern:/(^[ \t]*)!.*/m,lookbehind:!0,greedy:!0,alias:"property",inside:{variable:n}},delimiter:{pattern:/(^[ \t]*)@(?:end|start)uml\b/m,lookbehind:!0,greedy:!0,alias:"punctuation"},arrow:{pattern:RegExp(/(^|[^-.<>?|\\[\]ox])/.source+p+/(?![-.<>?|\\\]ox])/.source),lookbehind:!0,greedy:!0,alias:"operator",inside:{expression:{pattern:/(\[)[^[\]]+(?=\])/,lookbehind:!0,inside:null},punctuation:/\[(?=$|\])|^\]/}},string:{pattern:/"[^"]*"/,greedy:!0},text:{pattern:/(\[[ \t]*[\r\n]+(?![\r\n]))[^\]]*(?=\])/,lookbehind:!0,greedy:!0,alias:"string"},keyword:[{pattern:/^([ \t]*)(?:abstract\s+class|end\s+(?:box|fork|group|merge|note|ref|split|title)|(?:fork|split)(?:\s+again)?|activate|actor|agent|alt|annotation|artifact|autoactivate|autonumber|backward|binary|boundary|box|break|caption|card|case|circle|class|clock|cloud|collections|component|concise|control|create|critical|database|deactivate|destroy|detach|diamond|else|elseif|end|end[hr]note|endif|endswitch|endwhile|entity|enum|file|folder|footer|frame|group|[hr]?note|header|hexagon|hide|if|interface|label|legend|loop|map|namespace|network|newpage|node|nwdiag|object|opt|package|page|par|participant|person|queue|rectangle|ref|remove|repeat|restore|return|robust|scale|set|show|skinparam|stack|start|state|stop|storage|switch|title|together|usecase|usecase\/|while)(?=\s|$)/m,lookbehind:!0,greedy:!0},/\b(?:elseif|equals|not|while)(?=\s*\()/,/\b(?:as|is|then)\b/],divider:{pattern:/^==.+==$/m,greedy:!0,alias:"important"},time:{pattern:/@(?:\d+(?:[:/]\d+){2}|[+-]?\d+|:[a-z]\w*(?:[+-]\d+)?)\b/i,greedy:!0,alias:"number"},color:{pattern:/#(?:[a-z_]+|[a-fA-F0-9]+)\b/,alias:"symbol"},variable:n,punctuation:/[:,;()[\]{}]|\.{3}/},t.languages["plant-uml"].arrow.inside.expression.inside=t.languages["plant-uml"],t.languages.plantuml=t.languages["plant-uml"]})(e)}A_.displayName="plsql";A_.aliases=[];function A_(e){e.register(Tc),e.languages.plsql=e.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),e.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}})}k_.displayName="powerquery";k_.aliases=["mscript","pq"];function k_(e){e.languages.powerquery={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},"quoted-identifier":{pattern:/#"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},string:{pattern:/(?:#!)?"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},constant:[/\bDay\.(?:Friday|Monday|Saturday|Sunday|Thursday|Tuesday|Wednesday)\b/,/\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/,/\bOccurrence\.(?:All|First|Last)\b/,/\bOrder\.(?:Ascending|Descending)\b/,/\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/,/\bMissingField\.(?:Error|Ignore|UseNull)\b/,/\bQuoteStyle\.(?:Csv|None)\b/,/\bJoinKind\.(?:FullOuter|Inner|LeftAnti|LeftOuter|RightAnti|RightOuter)\b/,/\bGroupKind\.(?:Global|Local)\b/,/\bExtraValues\.(?:Error|Ignore|List)\b/,/\bJoinAlgorithm\.(?:Dynamic|LeftHash|LeftIndex|PairwiseHash|RightHash|RightIndex|SortMerge)\b/,/\bJoinSide\.(?:Left|Right)\b/,/\bPrecision\.(?:Decimal|Double)\b/,/\bRelativePosition\.From(?:End|Start)\b/,/\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf16|Utf8|Windows)\b/,/\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Function|Int16|Int32|Int64|Int8|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/,/\bnull\b/],boolean:/\b(?:false|true)\b/,keyword:/\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/,function:{pattern:/(^|[^#\w.])[a-z_][\w.]*(?=\s*\()/i,lookbehind:!0},"data-type":{pattern:/\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time)\b/,alias:"class-name"},number:{pattern:/\b0x[\da-f]+\b|(?:[+-]?(?:\b\d+\.)?\b\d+|[+-]\.\d+|(^|[^.])\B\.\d+)(?:e[+-]?\d+)?\b/i,lookbehind:!0},operator:/[-+*\/&?@^]|<(?:=>?|>)?|>=?|=>?|\.\.\.?/,punctuation:/[,;\[\](){}]/},e.languages.pq=e.languages.powerquery,e.languages.mscript=e.languages.powerquery}R_.displayName="powershell";R_.aliases=[];function R_(e){(function(t){var n=t.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};n.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:n},boolean:n.boolean,variable:n.variable}})(e)}D_.displayName="processing";D_.aliases=[];function D_(e){e.register(zt),e.languages.processing=e.languages.extend("clike",{keyword:/\b(?:break|case|catch|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,function:/\b\w+(?=\s*\()/,operator:/<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/}),e.languages.insertBefore("processing","number",{constant:/\b(?!XML\b)[A-Z][A-Z\d_]+\b/,type:{pattern:/\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,alias:"class-name"}})}I_.displayName="prolog";I_.aliases=[];function I_(e){e.languages.prolog={comment:{pattern:/\/\*[\s\S]*?\*\/|%.*/,greedy:!0},string:{pattern:/(["'])(?:\1\1|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1(?!\1)/,greedy:!0},builtin:/\b(?:fx|fy|xf[xy]?|yfx?)\b/,function:/\b[a-z]\w*(?:(?=\()|\/\d+)/,number:/\b\d+(?:\.\d*)?/,operator:/[:\\=><\-?*@\/;+^|!$.]+|\b(?:is|mod|not|xor)\b/,punctuation:/[(){}\[\],]/}}j_.displayName="promql";j_.aliases=[];function j_(e){(function(t){var n=["sum","min","max","avg","group","stddev","stdvar","count","count_values","bottomk","topk","quantile"],s=["on","ignoring","group_right","group_left","by","without"],a=["offset"],o=n.concat(s,a);t.languages.promql={comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},"vector-match":{pattern:new RegExp("((?:"+s.join("|")+")\\s*)\\([^)]*\\)"),lookbehind:!0,inside:{"label-key":{pattern:/\b[^,]+\b/,alias:"attr-name"},punctuation:/[(),]/}},"context-labels":{pattern:/\{[^{}]*\}/,inside:{"label-key":{pattern:/\b[a-z_]\w*(?=\s*(?:=|![=~]))/,alias:"attr-name"},"label-value":{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0,alias:"attr-value"},punctuation:/\{|\}|=~?|![=~]|,/}},"context-range":[{pattern:/\[[\w\s:]+\]/,inside:{punctuation:/\[|\]|:/,"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}},{pattern:/(\boffset\s+)\w+/,lookbehind:!0,inside:{"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}}],keyword:new RegExp("\\b(?:"+o.join("|")+")\\b","i"),function:/\b[a-z_]\w*(?=\s*\()/i,number:/[-+]?(?:(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[-+]?\d+)?\b|\b(?:0x[0-9a-f]+|nan|inf)\b)/i,operator:/[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|or|unless)\b/i,punctuation:/[{};()`,.[\]]/}})(e)}O_.displayName="properties";O_.aliases=[];function O_(e){e.languages.properties={comment:/^[ \t]*[#!].*$/m,value:{pattern:/(^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?: *[=:] *(?! )| ))(?:\\(?:\r\n|[\s\S])|[^\\\r\n])+/m,lookbehind:!0,alias:"attr-value"},key:{pattern:/^[ \t]*(?:\\(?:\r\n|[\s\S])|[^\\\s:=])+(?= *[=:]| )/m,alias:"attr-name"},punctuation:/[=:]/}}L_.displayName="protobuf";L_.aliases=[];function L_(e){e.register(zt),(function(t){var n=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;t.languages.protobuf=t.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),t.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:n}},builtin:n,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})})(e)}M_.displayName="stylus";M_.aliases=[];function M_(e){(function(t){var n={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},s={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},a={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:s,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:s,punctuation:/[{}()\[\];:,]/};a.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:a}},a.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:a}},t.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:a}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:a}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:a}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:a.interpolation}},rest:a}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:a.interpolation,comment:a.comment,punctuation:/[{},]/}},func:a.func,string:a.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:a.interpolation,punctuation:/[{}()\[\];:.]/}})(e)}F_.displayName="twig";F_.aliases=[];function F_(e){e.register(Er),e.languages.twig={comment:/^\{#[\s\S]*?#\}$/,"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/}},keyword:/\b(?:even|if|odd)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/},e.hooks.add("before-tokenize",function(t){if(t.language==="twig"){var n=/\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g;e.languages["markup-templating"].buildPlaceholders(t,"twig",n)}}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"twig")})}P_.displayName="pug";P_.aliases=[];function P_(e){e.register(yr),e.register(ur),(function(t){t.languages.pug={comment:{pattern:/(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ].+)*/m,lookbehind:!0},"multiline-script":{pattern:/(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:t.languages.javascript},filter:{pattern:/(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},text:/\S[\s\S]*/}},"multiline-plain-text":{pattern:/(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0},markup:{pattern:/(^[\t ]*)<.+/m,lookbehind:!0,inside:t.languages.markup},doctype:{pattern:/((?:^|\n)[\t ]*)doctype(?: .+)?/,lookbehind:!0},"flow-control":{pattern:/(^[\t ]*)(?:case|default|each|else|if|unless|when|while)\b(?: .+)?/m,lookbehind:!0,inside:{each:{pattern:/^each .+? in\b/,inside:{keyword:/\b(?:each|in)\b/,punctuation:/,/}},branch:{pattern:/^(?:case|default|else|if|unless|when|while)\b/,alias:"keyword"},rest:t.languages.javascript}},keyword:{pattern:/(^[\t ]*)(?:append|block|extends|include|prepend)\b.+/m,lookbehind:!0},mixin:[{pattern:/(^[\t ]*)mixin .+/m,lookbehind:!0,inside:{keyword:/^mixin/,function:/\w+(?=\s*\(|\s*$)/,punctuation:/[(),.]/}},{pattern:/(^[\t ]*)\+.+/m,lookbehind:!0,inside:{name:{pattern:/^\+\w+/,alias:"function"},rest:t.languages.javascript}}],script:{pattern:/(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]).+/m,lookbehind:!0,inside:t.languages.javascript},"plain-text":{pattern:/(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]).+/m,lookbehind:!0},tag:{pattern:/(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,lookbehind:!0,inside:{attributes:[{pattern:/&[^(]+\([^)]+\)/,inside:t.languages.javascript},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*(?!\s))(?:\{[^}]*\}|[^,)\r\n]+)/,lookbehind:!0,inside:t.languages.javascript},"attr-name":/[\w-]+(?=\s*!?=|\s*[,)])/,punctuation:/[!=(),]+/}}],punctuation:/:/,"attr-id":/#[\w\-]+/,"attr-class":/\.[\w\-]+/}},code:[{pattern:/(^[\t ]*(?:-|!?=)).+/m,lookbehind:!0,inside:t.languages.javascript}],punctuation:/[.\-!=|]+/};for(var n=/(^([\t ]*)):<filter_name>(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/.source,s=[{filter:"atpl",language:"twig"},{filter:"coffee",language:"coffeescript"},"ejs","handlebars","less","livescript","markdown",{filter:"sass",language:"scss"},"stylus"],a={},o=0,u=s.length;o<u;o++){var c=s[o];c=typeof c=="string"?{filter:c,language:c}:c,t.languages[c.language]&&(a["filter-"+c.filter]={pattern:RegExp(n.replace("<filter_name>",function(){return c.filter}),"m"),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},text:{pattern:/\S[\s\S]*/,alias:[c.language,"language-"+c.language],inside:t.languages[c.language]}}})}t.languages.insertBefore("pug","filter",a)})(e)}B_.displayName="puppet";B_.aliases=[];function B_(e){(function(t){t.languages.puppet={heredoc:[{pattern:/(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,greedy:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,alias:"string",inside:{punctuation:{pattern:/(\().+?(?=\))/,lookbehind:!0}}}],"multiline-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,greedy:!0,alias:"comment"},regex:{pattern:/((?:\bnode\s+|[~=\(\[\{,]\s*|[=+]>\s*|^\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,lookbehind:!0,greedy:!0,inside:{"extended-regex":{pattern:/^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,inside:{comment:/#.*/}}}},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|\$(?!\{)|(?!\1)[^\\$]|\\[\s\S])*\1/,greedy:!0,inside:{"double-quoted":{pattern:/^"[\s\S]*"$/,inside:{}}}},variable:{pattern:/\$(?:::)?\w+(?:::\w+)*/,inside:{punctuation:/::/}},"attr-name":/(?:\b\w+|\*)(?=\s*=>)/,function:[{pattern:/(\.)(?!\d)\w+/,lookbehind:!0},/\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/],number:/\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,boolean:/\b(?:false|true)\b/,keyword:/\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,datatype:{pattern:/\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,alias:"symbol"},operator:/=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,punctuation:/[\[\]{}().,;]|:+/};var n=[{pattern:/(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,lookbehind:!0,inside:{"short-variable":{pattern:/(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}},delimiter:{pattern:/^\$/,alias:"variable"},rest:t.languages.puppet}},{pattern:/(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}}];t.languages.puppet.heredoc[0].inside.interpolation=n,t.languages.puppet.string.inside["double-quoted"].inside.interpolation=n})(e)}U_.displayName="pure";U_.aliases=[];function U_(e){(function(t){t.languages.pure={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0},/#!.+/],"inline-lang":{pattern:/%<[\s\S]+?%>/,greedy:!0,inside:{lang:{pattern:/(^%< *)-\*-.+?-\*-/,lookbehind:!0,alias:"comment"},delimiter:{pattern:/^%<.*|%>$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},number:{pattern:/((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?L?)/i,lookbehind:!0},keyword:/\b(?:NULL|ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,function:/\b(?:abs|add_(?:addr|constdef|(?:fundef|interface|macdef|typedef)(?:_at)?|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_c?string(?:_pointer)?|byte_(?:matrix|pointer)|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|sentry|short|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,special:{pattern:/\b__[a-z]+__\b/i,alias:"builtin"},operator:/(?:[!"#$%&'*+,\-.\/:<=>?@\\^`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]|\b_+\b)+|\b(?:and|div|mod|not|or)\b/,punctuation:/[(){}\[\];,|]/};var n=["c",{lang:"c++",alias:"cpp"},"fortran"],s=/%< *-\*- *<lang>\d* *-\*-[\s\S]+?%>/.source;n.forEach(function(a){var o=a;if(typeof a!="string"&&(o=a.alias,a=a.lang),t.languages[o]){var u={};u["inline-lang-"+o]={pattern:RegExp(s.replace("<lang>",a.replace(/([.+*?\/\\(){}\[\]])/g,"\\$1")),"i"),inside:t.util.clone(t.languages.pure["inline-lang"].inside)},u["inline-lang-"+o].inside.rest=t.util.clone(t.languages[o]),t.languages.insertBefore("pure","inline-lang",u)}}),t.languages.c&&(t.languages.pure["inline-lang"].inside.rest=t.util.clone(t.languages.c))})(e)}H_.displayName="purebasic";H_.aliases=["pbfasm"];function H_(e){e.register(zt),e.languages.purebasic=e.languages.extend("clike",{comment:/;.*/,keyword:/\b(?:align|and|as|break|calldebugger|case|compilercase|compilerdefault|compilerelse|compilerelseif|compilerendif|compilerendselect|compilererror|compilerif|compilerselect|continue|data|datasection|debug|debuglevel|declare|declarec|declarecdll|declaredll|declaremodule|default|define|dim|disableasm|disabledebugger|disableexplicit|else|elseif|enableasm|enabledebugger|enableexplicit|end|enddatasection|enddeclaremodule|endenumeration|endif|endimport|endinterface|endmacro|endmodule|endprocedure|endselect|endstructure|endstructureunion|endwith|enumeration|extends|fakereturn|for|foreach|forever|global|gosub|goto|if|import|importc|includebinary|includefile|includepath|interface|macro|module|newlist|newmap|next|not|or|procedure|procedurec|procedurecdll|proceduredll|procedurereturn|protected|prototype|prototypec|read|redim|repeat|restore|return|runtime|select|shared|static|step|structure|structureunion|swap|threaded|to|until|wend|while|with|xincludefile|xor)\b/i,function:/\b\w+(?:\.\w+)?\s*(?=\()/,number:/(?:\$[\da-f]+|\b-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\b/i,operator:/(?:@\*?|\?|\*)\w+\$?|-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|?\||[~^%?*/@]/}),e.languages.insertBefore("purebasic","keyword",{tag:/#\w+\$?/,asm:{pattern:/(^[\t ]*)!.*/m,lookbehind:!0,alias:"tag",inside:{comment:/;.*/,string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"label-reference-anonymous":{pattern:/(!\s*j[a-z]+\s+)@[fb]/i,lookbehind:!0,alias:"fasm-label"},"label-reference-addressed":{pattern:/(!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i,lookbehind:!0,alias:"fasm-label"},keyword:[/\b(?:extern|global)\b[^;\r\n]*/i,/\b(?:CPU|DEFAULT|FLOAT)\b.*/],function:{pattern:/^([\t ]*!\s*)[\da-z]+(?=\s|$)/im,lookbehind:!0},"function-inline":{pattern:/(:\s*)[\da-z]+(?=\s)/i,lookbehind:!0,alias:"function"},label:{pattern:/^([\t ]*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m,lookbehind:!0,alias:"fasm-label"},register:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s|mm\d+)\b/i,number:/(?:\b|-|(?=\$))(?:0[hx](?:[\da-f]*\.)?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-/%<>=&|$!,.:]/}}}),delete e.languages.purebasic["class-name"],delete e.languages.purebasic.boolean,e.languages.pbfasm=e.languages.purebasic}$_.displayName="purescript";$_.aliases=["purs"];function $_(e){e.register(sh),e.languages.purescript=e.languages.extend("haskell",{keyword:/\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b|∀/,"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|hiding|import)\b/,punctuation:/\./}},builtin:/\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/,operator:[e.languages.haskell.operator[0],e.languages.haskell.operator[2],/[\xa2-\xa6\xa8\xa9\xac\xae-\xb1\xb4\xb8\xd7\xf7\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u03f6\u0482\u058d-\u058f\u0606-\u0608\u060b\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u07fe\u07ff\u09f2\u09f3\u09fa\u09fb\u0af1\u0b70\u0bf3-\u0bfa\u0c7f\u0d4f\u0d79\u0e3f\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u166d\u17db\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u2044\u2052\u207a-\u207c\u208a-\u208c\u20a0-\u20bf\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u2140-\u2144\u214a-\u214d\u214f\u218a\u218b\u2190-\u2307\u230c-\u2328\u232b-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b73\u2b76-\u2b95\u2b97-\u2bff\u2ce5-\u2cea\u2e50\u2e51\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u309b\u309c\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua700-\ua716\ua720\ua721\ua789\ua78a\ua828-\ua82b\ua836-\ua839\uaa77-\uaa79\uab5b\uab6a\uab6b\ufb29\ufbb2-\ufbc1\ufdfc\ufdfd\ufe62\ufe64-\ufe66\ufe69\uff04\uff0b\uff1c-\uff1e\uff3e\uff40\uff5c\uff5e\uffe0-\uffe6\uffe8-\uffee\ufffc\ufffd]/]}),e.languages.purs=e.languages.purescript}z_.displayName="qsharp";z_.aliases=["qs"];function z_(e){e.register(zt),(function(t){function n(v,C){return v.replace(/<<(\d+)>>/g,function(S,b){return"(?:"+C[+b]+")"})}function s(v,C,S){return RegExp(n(v,C),"")}function a(v,C){for(var S=0;S<C;S++)v=v.replace(/<<self>>/g,function(){return"(?:"+v+")"});return v.replace(/<<self>>/g,"[^\\s\\S]")}var o={type:"Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero",other:"Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within"};function u(v){return"\\b(?:"+v.trim().replace(/ /g,"|")+")\\b"}var c=RegExp(u(o.type+" "+o.other)),d=/\b[A-Za-z_]\w*\b/.source,h=n(/<<0>>(?:\s*\.\s*<<0>>)*/.source,[d]),p={keyword:c,punctuation:/[<>()?,.:[\]]/},m=/"(?:\\.|[^\\"])*"/.source;t.languages.qsharp=t.languages.extend("clike",{comment:/\/\/.*/,string:[{pattern:s(/(^|[^$\\])<<0>>/.source,[m]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:s(/(\b(?:as|open)\s+)<<0>>(?=\s*(?:;|as\b))/.source,[h]),lookbehind:!0,inside:p},{pattern:s(/(\bnamespace\s+)<<0>>(?=\s*\{)/.source,[h]),lookbehind:!0,inside:p}],keyword:c,number:/(?:\b0(?:x[\da-f]+|b[01]+|o[0-7]+)|(?:\B\.\d+|\b\d+(?:\.\d*)?)(?:e[-+]?\d+)?)l?\b/i,operator:/\band=|\bor=|\band\b|\bnot\b|\bor\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/,punctuation:/::|[{}[\];(),.:]/}),t.languages.insertBefore("qsharp","number",{range:{pattern:/\.\./,alias:"operator"}});var g=a(n(/\{(?:[^"{}]|<<0>>|<<self>>)*\}/.source,[m]),2);t.languages.insertBefore("qsharp","string",{"interpolation-string":{pattern:s(/\$"(?:\\.|<<0>>|[^\\"{])*"/.source,[g]),greedy:!0,inside:{interpolation:{pattern:s(/((?:^|[^\\])(?:\\\\)*)<<0>>/.source,[g]),lookbehind:!0,inside:{punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-qsharp",inside:t.languages.qsharp}}},string:/[\s\S]+/}}})})(e),e.languages.qs=e.languages.qsharp}G_.displayName="q";G_.aliases=[];function G_(e){e.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0N[hje]?|0W[hj]?|0[wn]|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/}}q_.displayName="qml";q_.aliases=[];function q_(e){e.register(yr),(function(t){for(var n=/"(?:\\.|[^\\"\r\n])*"|'(?:\\.|[^\\'\r\n])*'/.source,s=/\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))*\*\//.source,a=/(?:[^\\()[\]{}"'/]|<string>|\/(?![*/])|<comment>|\(<expr>*\)|\[<expr>*\]|\{<expr>*\}|\\[\s\S])/.source.replace(/<string>/g,function(){return n}).replace(/<comment>/g,function(){return s}),o=0;o<2;o++)a=a.replace(/<expr>/g,function(){return a});a=a.replace(/<expr>/g,"[^\\s\\S]"),t.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp(/((?:^|;)[ \t]*)function\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*\(<js>*\)\s*\{<js>*\}/.source.replace(/<js>/g,function(){return a}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:t.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp(/(:[ \t]*)(?![\s;}[])(?:(?!$|[;}])<js>)+/.source.replace(/<js>/g,function(){return a}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:t.languages.javascript},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}})(e)}W_.displayName="qore";W_.aliases=[];function W_(e){e.register(zt),e.languages.qore=e.languages.extend("clike",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/|#).*)/,lookbehind:!0},string:{pattern:/("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:bool|date|float|int|list|number|string)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/,boolean:/\b(?:false|true)\b/i,function:/\$?\b(?!\d)\w+(?=\()/,number:/\b(?:0b[01]+|0x(?:[\da-f]*\.)?[\da-fp\-]+|(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?[df]|(?:\d+(?:\.\d+)?|\.\d+))\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|[!=](?:==?|~)?|>>?=?|<(?:=>?|<=?)?|&[&=]?|\|[|=]?|[*\/%^]=?|[~?])/,lookbehind:!0},variable:/\$(?!\d)\w+\b/})}V_.displayName="racket";V_.aliases=["rkt"];function V_(e){e.register(ah),e.languages.racket=e.languages.extend("scheme",{"lambda-parameter":{pattern:/([(\[]lambda\s+[(\[])[^()\[\]'\s]+/,lookbehind:!0}}),e.languages.insertBefore("racket","string",{lang:{pattern:/^#lang.+/m,greedy:!0,alias:"keyword"}}),e.languages.rkt=e.languages.racket}Y_.displayName="cshtml";Y_.aliases=["razor"];function Y_(e){e.register(jo),e.register(ur),(function(t){var n=/\/(?![/*])|\/\/.*[\r\n]|\/\*[^*]*(?:\*(?!\/)[^*]*)*\*\//.source,s=/@(?!")|"(?:[^\r\n\\"]|\\.)*"|@"(?:[^\\"]|""|\\[\s\S])*"(?!")/.source+"|"+/'(?:(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'|(?=[^\\](?!')))/.source;function a(E,_){for(var N=0;N<_;N++)E=E.replace(/<self>/g,function(){return"(?:"+E+")"});return E.replace(/<self>/g,"[^\\s\\S]").replace(/<str>/g,"(?:"+s+")").replace(/<comment>/g,"(?:"+n+")")}var o=a(/\((?:[^()'"@/]|<str>|<comment>|<self>)*\)/.source,2),u=a(/\[(?:[^\[\]'"@/]|<str>|<comment>|<self>)*\]/.source,1),c=a(/\{(?:[^{}'"@/]|<str>|<comment>|<self>)*\}/.source,2),d=a(/<(?:[^<>'"@/]|<comment>|<self>)*>/.source,1),h=/@/.source+/(?:await\b\s*)?/.source+"(?:"+/(?!await\b)\w+\b/.source+"|"+o+")(?:"+/[?!]?\.\w+\b/.source+"|(?:"+d+")?"+o+"|"+u+")*"+/(?![?!\.(\[]|<(?!\/))/.source,p=/@(?![\w()])/.source+"|"+h,m="(?:"+/"[^"@]*"|'[^'@]*'|[^\s'"@>=]+(?=[\s>])/.source+`|["'][^"'@]*(?:(?:`+p+`)[^"'@]*)+["'])`,g=/(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*<tagAttrValue>|(?=[\s/>])))+)?/.source.replace(/<tagAttrValue>/,m),v=/(?!\d)[^\s>\/=$<%]+/.source+g+/\s*\/?>/.source,C=/\B@?/.source+"(?:"+/<([a-zA-Z][\w:]*)/.source+g+/\s*>/.source+"(?:"+(/[^<]/.source+"|"+/<\/?(?!\1\b)/.source+v+"|"+a(/<\1/.source+g+/\s*>/.source+"(?:"+(/[^<]/.source+"|"+/<\/?(?!\1\b)/.source+v+"|<self>")+")*"+/<\/\1\s*>/.source,2))+")*"+/<\/\1\s*>/.source+"|"+/</.source+v+")";t.languages.cshtml=t.languages.extend("markup",{});var S=t.languages.insertBefore("csharp","string",{html:{pattern:RegExp(C),greedy:!0,inside:t.languages.cshtml}},{csharp:t.languages.extend("csharp",{})}),b={pattern:/\S[\s\S]*/,alias:"language-csharp",inside:S},y={pattern:RegExp(/(^|[^@])/.source+h),lookbehind:!0,greedy:!0,alias:"variable",inside:{keyword:/^@/,csharp:b}};t.languages.cshtml.tag.pattern=RegExp(/<\/?/.source+v),t.languages.cshtml.tag.inside["attr-value"].pattern=RegExp(/=\s*/.source+m),t.languages.insertBefore("inside","punctuation",{value:y},t.languages.cshtml.tag.inside["attr-value"]),t.languages.insertBefore("cshtml","prolog",{"razor-comment":{pattern:/@\*[\s\S]*?\*@/,greedy:!0,alias:"comment"},block:{pattern:RegExp(/(^|[^@])@/.source+"(?:"+[c,/(?:code|functions)\s*/.source+c,/(?:for|foreach|lock|switch|using|while)\s*/.source+o+/\s*/.source+c,/do\s*/.source+c+/\s*while\s*/.source+o+/(?:\s*;)?/.source,/try\s*/.source+c+/\s*catch\s*/.source+o+/\s*/.source+c+/\s*finally\s*/.source+c,/if\s*/.source+o+/\s*/.source+c+"(?:"+/\s*else/.source+"(?:"+/\s+if\s*/.source+o+")?"+/\s*/.source+c+")*",/helper\s+\w+\s*/.source+o+/\s*/.source+c].join("|")+")"),lookbehind:!0,greedy:!0,inside:{keyword:/^@\w*/,csharp:b}},directive:{pattern:/^([ \t]*)@(?:addTagHelper|attribute|implements|inherits|inject|layout|model|namespace|page|preservewhitespace|removeTagHelper|section|tagHelperPrefix|using)(?=\s).*/m,lookbehind:!0,greedy:!0,inside:{keyword:/^@\w+/,csharp:b}},value:y,"delegate-operator":{pattern:/(^|[^@])@(?=<)/,lookbehind:!0,alias:"operator"}}),t.languages.razor=t.languages.cshtml})(e)}tg.displayName="jsx";tg.aliases=[];function tg(e){e.register(yr),e.register(ur),(function(t){var n=t.util.clone(t.languages.javascript),s=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,a=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function u(h,p){return h=h.replace(/<S>/g,function(){return s}).replace(/<BRACES>/g,function(){return a}).replace(/<SPREAD>/g,function(){return o}),RegExp(h,p)}o=u(o).source,t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=u(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.jsx.tag.inside.comment=n.comment,t.languages.insertBefore("inside","attr-name",{spread:{pattern:u(/<SPREAD>/.source),inside:t.languages.jsx}},t.languages.jsx.tag),t.languages.insertBefore("inside","special-attr",{script:{pattern:u(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:t.languages.jsx}}},t.languages.jsx.tag);var c=function(h){return h?typeof h=="string"?h:typeof h.content=="string"?h.content:h.content.map(c).join(""):""},d=function(h){for(var p=[],m=0;m<h.length;m++){var g=h[m],v=!1;if(typeof g!="string"&&(g.type==="tag"&&g.content[0]&&g.content[0].type==="tag"?g.content[0].content[0].content==="</"?p.length>0&&p[p.length-1].tagName===c(g.content[0].content[1])&&p.pop():g.content[g.content.length-1].content==="/>"||p.push({tagName:c(g.content[0].content[1]),openedBraces:0}):p.length>0&&g.type==="punctuation"&&g.content==="{"?p[p.length-1].openedBraces++:p.length>0&&p[p.length-1].openedBraces>0&&g.type==="punctuation"&&g.content==="}"?p[p.length-1].openedBraces--:v=!0),(v||typeof g=="string")&&p.length>0&&p[p.length-1].openedBraces===0){var C=c(g);m<h.length-1&&(typeof h[m+1]=="string"||h[m+1].type==="plain-text")&&(C+=c(h[m+1]),h.splice(m+1,1)),m>0&&(typeof h[m-1]=="string"||h[m-1].type==="plain-text")&&(C=c(h[m-1])+C,h.splice(m-1,1),m--),h[m]=new t.Token("plain-text",C,null,C)}g.content&&typeof g.content!="string"&&d(g.content)}};t.hooks.add("after-tokenize",function(h){h.language!=="jsx"&&h.language!=="tsx"||d(h.tokens)})})(e)}K_.displayName="tsx";K_.aliases=[];function K_(e){e.register(tg),e.register(Ac),(function(t){var n=t.util.clone(t.languages.typescript);t.languages.tsx=t.languages.extend("jsx",n),delete t.languages.tsx.parameter,delete t.languages.tsx["literal-property"];var s=t.languages.tsx.tag;s.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+s.pattern.source+")",s.pattern.flags),s.lookbehind=!0})(e)}X_.displayName="reason";X_.aliases=[];function X_(e){e.register(zt),e.languages.reason=e.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),e.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete e.languages.reason.function}Z_.displayName="rego";Z_.aliases=[];function Z_(e){e.languages.rego={comment:/#.*/,property:{pattern:/(^|[^\\.])(?:"(?:\\.|[^\\"\r\n])*"|`[^`]*`|\b[a-z_]\w*\b)(?=\s*:(?!=))/i,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:as|default|else|import|not|null|package|set(?=\s*\()|some|with)\b/,boolean:/\b(?:false|true)\b/,function:{pattern:/\b[a-z_]\w*\b(?:\s*\.\s*\b[a-z_]\w*\b)*(?=\s*\()/i,inside:{namespace:/\b\w+\b(?=\s*\.)/,punctuation:/\./}},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,operator:/[-+*/%|&]|[<>:=]=?|!=|\b_\b/,punctuation:/[,;.\[\]{}()]/}}Q_.displayName="renpy";Q_.aliases=["rpy"];function Q_(e){e.languages.renpy={comment:{pattern:/(^|[^\\])#.+/,lookbehind:!0},string:{pattern:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\])*\2|(?:^#?(?:(?:[0-9a-fA-F]){3}|[0-9a-fA-F]{6})$)/m,greedy:!0},function:/\b[a-z_]\w*(?=\()/i,property:/\b(?:Update|UpdateVersion|action|activate_sound|adv_nvl_transition|after_load_transition|align|alpha|alt|anchor|antialias|area|auto|background|bar_invert|bar_resizing|bar_vertical|black_color|bold|bottom_bar|bottom_gutter|bottom_margin|bottom_padding|box_reverse|box_wrap|can_update|caret|child|color|crop|default_afm_enable|default_afm_time|default_fullscreen|default_text_cps|developer|directory_name|drag_handle|drag_joined|drag_name|drag_raise|draggable|dragged|drop_shadow|drop_shadow_color|droppable|dropped|easein|easeout|edgescroll|end_game_transition|end_splash_transition|enter_replay_transition|enter_sound|enter_transition|enter_yesno_transition|executable_name|exit_replay_transition|exit_sound|exit_transition|exit_yesno_transition|fadein|fadeout|first_indent|first_spacing|fit_first|focus|focus_mask|font|foreground|game_main_transition|get_installed_packages|google_play_key|google_play_salt|ground|has_music|has_sound|has_voice|height|help|hinting|hover|hover_background|hover_color|hover_sound|hovered|hyperlink_functions|idle|idle_color|image_style|include_update|insensitive|insensitive_background|insensitive_color|inside|intra_transition|italic|justify|kerning|keyboard_focus|language|layer_clipping|layers|layout|left_bar|left_gutter|left_margin|left_padding|length|line_leading|line_overlap_split|line_spacing|linear|main_game_transition|main_menu_music|maximum|min_width|minimum|minwidth|modal|mouse|mousewheel|name|narrator_menu|newline_indent|nvl_adv_transition|offset|order_reverse|outlines|overlay_functions|pos|position|prefix|radius|range|rest_indent|right_bar|right_gutter|right_margin|right_padding|rotate|rotate_pad|ruby_style|sample_sound|save_directory|say_attribute_transition|screen_height|screen_width|scrollbars|selected_hover|selected_hover_color|selected_idle|selected_idle_color|selected_insensitive|show_side_image|show_two_window|side_spacing|side_xpos|side_ypos|size|size_group|slow_cps|slow_cps_multiplier|spacing|strikethrough|subpixel|text_align|text_style|text_xpos|text_y_fudge|text_ypos|thumb|thumb_offset|thumb_shadow|thumbnail_height|thumbnail_width|time|top_bar|top_gutter|top_margin|top_padding|translations|underline|unscrollable|update|value|version|version_name|version_tuple|vertical|width|window_hide_transition|window_icon|window_left_padding|window_show_transition|window_title|windows_icon|xadjustment|xalign|xanchor|xanchoraround|xaround|xcenter|xfill|xinitial|xmargin|xmaximum|xminimum|xoffset|xofsset|xpadding|xpos|xsize|xzoom|yadjustment|yalign|yanchor|yanchoraround|yaround|ycenter|yfill|yinitial|ymargin|ymaximum|yminimum|yoffset|ypadding|ypos|ysize|ysizexysize|yzoom|zoom|zorder)\b/,tag:/\b(?:bar|block|button|buttoscreenn|drag|draggroup|fixed|frame|grid|[hv]box|hotbar|hotspot|image|imagebutton|imagemap|input|key|label|menu|mm_menu_frame|mousearea|nvl|parallel|screen|self|side|tag|text|textbutton|timer|vbar|viewport|window)\b|\$/,keyword:/\b(?:None|add|adjustment|alignaround|allow|angle|animation|around|as|assert|behind|box_layout|break|build|cache|call|center|changed|child_size|choice|circles|class|clear|clicked|clipping|clockwise|config|contains|continue|corner1|corner2|counterclockwise|def|default|define|del|delay|disabled|disabled_text|dissolve|elif|else|event|except|exclude|exec|expression|fade|finally|for|from|function|global|gm_root|has|hide|id|if|import|in|init|is|jump|knot|lambda|left|less_rounded|mm_root|movie|music|null|on|onlayer|pass|pause|persistent|play|print|python|queue|raise|random|renpy|repeat|return|right|rounded_window|scene|scope|set|show|slow|slow_abortable|slow_done|sound|stop|store|style|style_group|substitute|suffix|theme|transform|transform_anchor|transpose|try|ui|unhovered|updater|use|voice|while|widget|widget_hover|widget_selected|widget_text|yield)\b/,boolean:/\b(?:[Ff]alse|[Tt]rue)\b/,number:/(?:\b(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?)|\B\.\d+)(?:e[+-]?\d+)?j?/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with)\b/,punctuation:/[{}[\];(),.:]/},e.languages.rpy=e.languages.renpy}J_.displayName="rescript";J_.aliases=["res"];function J_(e){e.languages.rescript={comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},char:{pattern:/'(?:[^\r\n\\]|\\(?:.|\w+))'/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*|@[a-z.]*|#[A-Za-z]\w*|#\d/,function:{pattern:/[a-zA-Z]\w*(?=\()|(\.)[a-z]\w*/,lookbehind:!0},number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,boolean:/\b(?:false|true)\b/,"attr-value":/[A-Za-z]\w*(?==)/,constant:{pattern:/(\btype\s+)[a-z]\w*/,lookbehind:!0},tag:{pattern:/(<)[a-z]\w*|(?:<\/)[a-z]\w*/,lookbehind:!0,inside:{operator:/<|>|\//}},keyword:/\b(?:and|as|assert|begin|bool|class|constraint|do|done|downto|else|end|exception|external|float|for|fun|function|if|in|include|inherit|initializer|int|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|string|switch|then|to|try|type|when|while|with)\b/,operator:/\.{3}|:[:=]?|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/,punctuation:/[(){}[\],;.]/},e.languages.insertBefore("rescript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"tag"},rest:e.languages.rescript}},string:/[\s\S]+/}}}),e.languages.res=e.languages.rescript}ew.displayName="rest";ew.aliases=[];function ew(e){e.languages.rest={table:[{pattern:/(^[\t ]*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1[+|].+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/m,lookbehind:!0,inside:{punctuation:/\||(?:\+[=-]+)+\+/}},{pattern:/(^[\t ]*)=+ [ =]*=(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1=+ [ =]*=(?=(?:\r?\n|\r){2}|\s*$)/m,lookbehind:!0,inside:{punctuation:/[=-]+/}}],"substitution-def":{pattern:/(^[\t ]*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,lookbehind:!0,inside:{substitution:{pattern:/^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,alias:"attr-value",inside:{punctuation:/^\||\|$/}},directive:{pattern:/( )(?! )[^:]+::/,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}}}},"link-target":[{pattern:/(^[\t ]*\.\. )\[[^\]]+\]/m,lookbehind:!0,alias:"string",inside:{punctuation:/^\[|\]$/}},{pattern:/(^[\t ]*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,lookbehind:!0,alias:"string",inside:{punctuation:/^_|:$/}}],directive:{pattern:/(^[\t ]*\.\. )[^:]+::/m,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}},comment:{pattern:/(^[\t ]*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,lookbehind:!0},title:[{pattern:/^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,inside:{punctuation:/^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}},{pattern:/(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,lookbehind:!0,inside:{punctuation:/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}}],hr:{pattern:/((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,lookbehind:!0,alias:"punctuation"},field:{pattern:/(^[\t ]*):[^:\r\n]+:(?= )/m,lookbehind:!0,alias:"attr-name"},"command-line-option":{pattern:/(^[\t ]*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,lookbehind:!0,alias:"symbol"},"literal-block":{pattern:/::(?:\r?\n|\r){2}([ \t]+)(?![ \t]).+(?:(?:\r?\n|\r)\1.+)*/,inside:{"literal-block-punctuation":{pattern:/^::/,alias:"punctuation"}}},"quoted-literal-block":{pattern:/::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,inside:{"literal-block-punctuation":{pattern:/^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,alias:"punctuation"}}},"list-bullet":{pattern:/(^[\t ]*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,lookbehind:!0,alias:"punctuation"},"doctest-block":{pattern:/(^[\t ]*)>>> .+(?:(?:\r?\n|\r).+)*/m,lookbehind:!0,inside:{punctuation:/^>>>/}},inline:[{pattern:/(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s)(?:(?!\2).)*\S\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,lookbehind:!0,inside:{bold:{pattern:/(^\*\*).+(?=\*\*$)/,lookbehind:!0},italic:{pattern:/(^\*).+(?=\*$)/,lookbehind:!0},"inline-literal":{pattern:/(^``).+(?=``$)/,lookbehind:!0,alias:"symbol"},role:{pattern:/^:[^:]+:|:[^:]+:$/,alias:"function",inside:{punctuation:/^:|:$/}},"interpreted-text":{pattern:/(^`).+(?=`$)/,lookbehind:!0,alias:"attr-value"},substitution:{pattern:/(^\|).+(?=\|$)/,lookbehind:!0,alias:"attr-value"},punctuation:/\*\*?|``?|\|/}}],link:[{pattern:/\[[^\[\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,alias:"string",inside:{punctuation:/^\[|\]_$/}},{pattern:/(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,alias:"string",inside:{punctuation:/^_?`|`$|`?_?_$/}}],punctuation:{pattern:/(^[\t ]*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,lookbehind:!0}}}tw.displayName="rip";tw.aliases=[];function tw(e){e.languages.rip={comment:{pattern:/#.*/,greedy:!0},char:{pattern:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},regex:{pattern:/(^|[^/])\/(?!\/)(?:\[[^\n\r\]]*\]|\\.|[^/\\\r\n\[])+\/(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},keyword:/(?:=>|->)|\b(?:case|catch|class|else|exit|finally|if|raise|return|switch|try)\b/,builtin:/@|\bSystem\b/,boolean:/\b(?:false|true)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,number:/[+-]?\b(?:\d+\.\d+|\d+)\b/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/}}nw.displayName="roboconf";nw.aliases=[];function nw(e){e.languages.roboconf={comment:/#.*/,keyword:{pattern:/(^|\s)(?:(?:external|import)\b|(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{))/,lookbehind:!0},component:{pattern:/[\w-]+(?=[ \t]*\{)/,alias:"variable"},property:/[\w.-]+(?=[ \t]*:)/,value:{pattern:/(=[ \t]*(?![ \t]))[^,;]+/,lookbehind:!0,alias:"attr-value"},optional:{pattern:/\(optional\)/,alias:"builtin"},wildcard:{pattern:/(\.)\*/,lookbehind:!0,alias:"operator"},punctuation:/[{},.;:=]/}}rw.displayName="robotframework";rw.aliases=["robot"];function rw(e){(function(t){var n={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},s={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function a(d,h){var p={};p["section-header"]={pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"};for(var m in h)p[m]=h[m];return p.tag={pattern:/([\r\n](?: {2}|\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},p.variable=s,p.comment=n,{pattern:RegExp(/^ ?\*{3}[ \t]*<name>[ \t]*\*{3}(?:.|[\r\n](?!\*{3}))*/.source.replace(/<name>/g,function(){return d}),"im"),alias:"section",inside:p}}var o={pattern:/(\[Documentation\](?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},u={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:s}},c={pattern:/([\r\n](?: {2}|\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:s}};t.languages.robotframework={settings:a("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:a("Variables"),"test-cases":a("Test Cases",{"test-name":u,documentation:o,property:c}),keywords:a("Keywords",{"keyword-name":u,documentation:o,property:c}),tasks:a("Tasks",{"task-name":u,documentation:o,property:c}),comment:n},t.languages.robot=t.languages.robotframework})(e)}sw.displayName="sas";sw.aliases=[];function sw(e){(function(t){var n=/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))/.source,s=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,a={pattern:RegExp(n+"[bx]"),alias:"number"},o={pattern:/&[a-z_]\w*/i},u={pattern:/((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMEXIST|SYMGLOBL|SYMLOCAL|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},c={pattern:/(^|\s)(?:proc\s+\w+|data(?!=)|quit|run)\b/i,alias:"keyword",lookbehind:!0},d=[/\/\*[\s\S]*?\*\//,{pattern:/(^[ \t]*|;\s*)\*[^;]*;/m,lookbehind:!0}],h={pattern:RegExp(n),greedy:!0},p=/[$%@.(){}\[\];,\\]/,m={pattern:/%?\b\w+(?=\()/,alias:"keyword"},g={function:m,"arg-value":{pattern:/(=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":o,arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:s,"numeric-constant":a,punctuation:p,string:h},v={pattern:/\b(?:format|put)\b=?[\w'$.]+/i,inside:{keyword:/^(?:format|put)(?==)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/,alias:"number"}}},C={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},S={pattern:/((?:^|\s)=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},b={pattern:/(^|\s)(?:submit(?:\s+(?:load|norun|parseonly))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},y=/aStore|accessControl|aggregation|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|cdm|clustering|conditionalRandomFields|configuration|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deduplication|deepLearn|deepNeural|deepRnn|ds2|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gVarCluster|gam|gleam|graphSemiSupLearn|hiddenMarkovModel|hyperGroup|ica|image|iml|kernalPca|langModel|ldaTopic|loadStreams|mbc|mixed|mlTools|modelPublishing|network|neuralNet|nmf|nonParametricBayes|nonlinear|optNetwork|optimization|panel|pca|percentile|phreg|pls|qkb|qlim|quantreg|recommend|regression|reinforcementLearn|robustPca|ruleMining|sampling|sandwich|sccasl|search(?:Analytics)?|sentimentAnalysis|sequence|session(?:Prop)?|severity|simSystem|simple|smartData|sparkEmbeddedProcess|sparseML|spatialreg|spc|stabilityMonitoring|svDataDescription|svm|table|text(?:Filters|Frequency|Mining|Parse|Rule(?:Develop|Score)|Topic|Util)|timeData|transpose|tsInfo|tsReconcile|uniTimeSeries|varReduce/.source,E={pattern:RegExp(/(^|\s)(?:action\s+)?(?:<act>)\.[a-z]+\b[^;]+/.source.replace(/<act>/g,function(){return y}),"i"),lookbehind:!0,inside:{keyword:RegExp(/(?:<act>)\.[a-z]+\b/.source.replace(/<act>/g,function(){return y}),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},comment:d,function:m,"arg-value":g["arg-value"],operator:g.operator,argument:g.arg,number:s,"numeric-constant":a,punctuation:p,string:h}},_={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|else|end(?:comp|source)?|entryTitle|eval(?:uate)?|exec(?:ute)?|exit|file(?:name)?|fill(?:attrs)?|flist|fnc|function(?:list)?|global|goto|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|_?null_|name|noobs|nowd|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|print|put|raise|ranexp|rannor|rbreak|retain|return|select|session|sessref|set|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|y2axisopts|yaxisopts)\b/i,lookbehind:!0};t.languages.sas={datalines:{pattern:/^([ \t]*)(?:cards|(?:data)?lines);[\s\S]+?^[ \t]*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:cards|(?:data)?lines)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp(/^[ \t]*(?:select|alter\s+table|(?:create|describe|drop)\s+(?:index|table(?:\s+constraints)?|view)|create\s+unique\s+index|insert\s+into|update)(?:<str>|[^;"'])+;/.source.replace(/<str>/g,function(){return n}),"im"),alias:"language-sql",inside:t.languages.sql},"global-statements":S,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|begin|commit|exec(?:ute)?|reset|rollback|validate)\b/i,lookbehind:!0,alias:"keyword"},number:s,"numeric-constant":a,punctuation:p,string:h}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:d,groovy:{pattern:RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:<str>|[^"'])+?(?=endsubmit;)/.source.replace(/<str>/g,function(){return n}),"im"),lookbehind:!0,alias:"language-groovy",inside:t.languages.groovy},keyword:_,"submit-statement":b,"global-statements":S,number:s,"numeric-constant":a,punctuation:p,string:h}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:d,lua:{pattern:RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:<str>|[^"'])+?(?=endsubmit;)/.source.replace(/<str>/g,function(){return n}),"im"),lookbehind:!0,alias:"language-lua",inside:t.languages.lua},keyword:_,"submit-statement":b,"global-statements":S,number:s,"numeric-constant":a,punctuation:p,string:h}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:d,"statement-var":{pattern:/((?:^|\s)=?)saveresult\s[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:g}},"cas-actions":E,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:g},step:c,keyword:_,function:m,format:v,altformat:C,"global-statements":S,number:s,"numeric-constant":a,punctuation:p,string:h}},"proc-args":{pattern:RegExp(/(^proc\s+\w+\s+)(?!\s)(?:[^;"']|<str>)+;/.source.replace(/<str>/g,function(){return n}),"im"),lookbehind:!0,inside:g},"macro-keyword":u,"macro-variable":o,"macro-string-functions":{pattern:/((?:^|\s|=))%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)\(.*?(?:[^%]\))/i,lookbehind:!0,inside:{function:{pattern:/%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)/i,alias:"keyword"},"macro-keyword":u,"macro-variable":o,"escaped-char":{pattern:/%['"()<>=¬^~;,#]/},punctuation:p}},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:d,number:s,"numeric-constant":a}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:g},"cas-actions":E,comment:d,function:m,format:v,altformat:C,"numeric-constant":a,datetime:{pattern:RegExp(n+"(?:dt?|t)"),alias:"number"},string:h,step:c,keyword:_,"operator-keyword":{pattern:/\b(?:eq|ge|gt|in|le|lt|ne|not)\b/i,alias:"operator"},number:s,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/,punctuation:p}})(e)}aw.displayName="shell-session";aw.aliases=["sh-session","shellsession"];function aw(e){e.register(Zd),(function(t){var n=[/"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/.source,/'[^']*'/.source,/\$'(?:[^'\\]|\\[\s\S])*'/.source,/<<-?\s*(["']?)(\w+)\1\s[\s\S]*?[\r\n]\2/.source].join("|");t.languages["shell-session"]={command:{pattern:RegExp(/^/.source+"(?:"+(/[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+(?::[^\0-\x1F$#%*?"<>:;|]+)?/.source+"|"+/[/~.][^\0-\x1F$#%*?"<>@:;|]*/.source)+")?"+/[$#%](?=\s)/.source+/(?:[^\\\r\n \t'"<$]|[ \t](?:(?!#)|#.*$)|\\(?:[^\r]|\r\n?)|\$(?!')|<(?!<)|<<str>>)+/.source.replace(/<<str>>/g,function(){return n}),"m"),greedy:!0,inside:{info:{pattern:/^[^#$%]+/,alias:"punctuation",inside:{user:/^[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+/,punctuation:/:/,path:/[\s\S]+/}},bash:{pattern:/(^[$#%]\s*)\S[\s\S]*/,lookbehind:!0,alias:"language-bash",inside:t.languages.bash},"shell-symbol":{pattern:/^[$#%]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},t.languages["sh-session"]=t.languages.shellsession=t.languages["shell-session"]})(e)}iw.displayName="smali";iw.aliases=[];function iw(e){e.languages.smali={comment:/#.*/,string:{pattern:/"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\(?:.|u[\da-fA-F]{4}))'/,greedy:!0},"class-name":{pattern:/(^|[^L])L(?:(?:\w+|`[^`\r\n]*`)\/)*(?:[\w$]+|`[^`\r\n]*`)(?=\s*;)/,lookbehind:!0,inside:{"class-name":{pattern:/(^L|\/)(?:[\w$]+|`[^`\r\n]*`)$/,lookbehind:!0},namespace:{pattern:/^(L)(?:(?:\w+|`[^`\r\n]*`)\/)+/,lookbehind:!0,inside:{punctuation:/\//}},builtin:/^L/}},builtin:[{pattern:/([();\[])[BCDFIJSVZ]+/,lookbehind:!0},{pattern:/([\w$>]:)[BCDFIJSVZ]/,lookbehind:!0}],keyword:[{pattern:/(\.end\s+)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])\.(?!\d)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])(?:abstract|annotation|bridge|constructor|enum|final|interface|private|protected|public|runtime|static|synthetic|system|transient)(?![\w.-])/,lookbehind:!0}],function:{pattern:/(^|[^\w.-])(?:\w+|<[\w$-]+>)(?=\()/,lookbehind:!0},field:{pattern:/[\w$]+(?=:)/,alias:"variable"},register:{pattern:/(^|[^\w.-])[vp]\d(?![\w.-])/,lookbehind:!0,alias:"variable"},boolean:{pattern:/(^|[^\w.-])(?:false|true)(?![\w.-])/,lookbehind:!0},number:{pattern:/(^|[^/\w.-])-?(?:NAN|INFINITY|0x(?:[\dA-F]+(?:\.[\dA-F]*)?|\.[\dA-F]+)(?:p[+-]?[\dA-F]+)?|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)[dflst]?(?![\w.-])/i,lookbehind:!0},label:{pattern:/(:)\w+/,lookbehind:!0,alias:"property"},operator:/->|\.\.|[\[=]/,punctuation:/[{}(),;:]/}}ow.displayName="smalltalk";ow.aliases=[];function ow(e){e.languages.smalltalk={comment:{pattern:/"(?:""|[^"])*"/,greedy:!0},char:{pattern:/\$./,greedy:!0},string:{pattern:/'(?:''|[^'])*'/,greedy:!0},symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:new|nil|self|super)\b/,boolean:/\b(?:false|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}}lw.displayName="smarty";lw.aliases=[];function lw(e){e.register(Er),(function(t){t.languages.smarty={comment:{pattern:/^\{\*[\s\S]*?\*\}/,greedy:!0},"embedded-php":{pattern:/^\{php\}[\s\S]*?\{\/php\}/,greedy:!0,inside:{smarty:{pattern:/^\{php\}|\{\/php\}$/,inside:null},php:{pattern:/[\s\S]+/,alias:"language-php",inside:t.languages.php}}},string:[{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0,inside:{interpolation:{pattern:/\{[^{}]*\}|`[^`]*`/,inside:{"interpolation-punctuation":{pattern:/^[{`]|[`}]$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},variable:/\$\w+/}},{pattern:/'(?:\\.|[^'\\\r\n])*'/,greedy:!0}],keyword:{pattern:/(^\{\/?)[a-z_]\w*\b(?!\()/i,lookbehind:!0,greedy:!0},delimiter:{pattern:/^\{\/?|\}$/,greedy:!0,alias:"punctuation"},number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,variable:[/\$(?!\d)\w+/,/#(?!\d)\w+#/,{pattern:/(\.|->|\w\s*=)(?!\d)\w+\b(?!\()/,lookbehind:!0},{pattern:/(\[)(?!\d)\w+(?=\])/,lookbehind:!0}],function:{pattern:/(\|\s*)@?[a-z_]\w*|\b[a-z_]\w*(?=\()/i,lookbehind:!0},"attr-name":/\b[a-z_]\w*(?=\s*=)/i,boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\[\](){}.,:`]|->/,operator:[/[+\-*\/%]|==?=?|[!<>]=?|&&|\|\|?/,/\bis\s+(?:not\s+)?(?:div|even|odd)(?:\s+by)?\b/,/\b(?:and|eq|gt?e|gt|lt?e|lt|mod|neq?|not|or)\b/]},t.languages.smarty["embedded-php"].inside.smarty.inside=t.languages.smarty,t.languages.smarty.string[0].inside.interpolation.inside.expression.inside=t.languages.smarty;var n=/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,s=RegExp(/\{\*[\s\S]*?\*\}/.source+"|"+/\{php\}[\s\S]*?\{\/php\}/.source+"|"+/\{(?:[^{}"']|<str>|\{(?:[^{}"']|<str>|\{(?:[^{}"']|<str>)*\})*\})*\}/.source.replace(/<str>/g,function(){return n.source}),"g");t.hooks.add("before-tokenize",function(a){var o="{literal}",u="{/literal}",c=!1;t.languages["markup-templating"].buildPlaceholders(a,"smarty",s,function(d){return d===u&&(c=!1),c?!1:(d===o&&(c=!0),!0)})}),t.hooks.add("after-tokenize",function(a){t.languages["markup-templating"].tokenizePlaceholders(a,"smarty")})})(e)}cw.displayName="sml";cw.aliases=["smlnj"];function cw(e){(function(t){var n=/\b(?:abstype|and|andalso|as|case|datatype|do|else|end|eqtype|exception|fn|fun|functor|handle|if|in|include|infix|infixr|let|local|nonfix|of|op|open|orelse|raise|rec|sharing|sig|signature|struct|structure|then|type|val|where|while|with|withtype)\b/i;t.languages.sml={comment:/\(\*(?:[^*(]|\*(?!\))|\((?!\*)|\(\*(?:[^*(]|\*(?!\))|\((?!\*))*\*\))*\*\)/,string:{pattern:/#?"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":[{pattern:RegExp(/((?:^|[^:]):\s*)<TERMINAL>(?:\s*(?:(?:\*|->)\s*<TERMINAL>|,\s*<TERMINAL>(?:(?=<NOT-LAST>)|(?!<NOT-LAST>)\s+<LONG-ID>)))*/.source.replace(/<NOT-LAST>/g,function(){return/\s*(?:[*,]|->)/.source}).replace(/<TERMINAL>/g,function(){return/(?:'[\w']*|<LONG-ID>|\((?:[^()]|\([^()]*\))*\)|\{(?:[^{}]|\{[^{}]*\})*\})(?:\s+<LONG-ID>)*/.source}).replace(/<LONG-ID>/g,function(){return/(?!<KEYWORD>)[a-z\d_][\w'.]*/.source}).replace(/<KEYWORD>/g,function(){return n.source}),"i"),lookbehind:!0,greedy:!0,inside:null},{pattern:/((?:^|[^\w'])(?:datatype|exception|functor|signature|structure|type)\s+)[a-z_][\w'.]*/i,lookbehind:!0}],function:{pattern:/((?:^|[^\w'])fun\s+)[a-z_][\w'.]*/i,lookbehind:!0},keyword:n,variable:{pattern:/(^|[^\w'])'[\w']*/,lookbehind:!0},number:/~?\b(?:\d+(?:\.\d+)?(?:e~?\d+)?|0x[\da-f]+)\b/i,word:{pattern:/\b0w(?:\d+|x[\da-f]+)\b/i,alias:"constant"},boolean:/\b(?:false|true)\b/i,operator:/\.\.\.|:[>=:]|=>?|->|[<>]=?|[!+\-*/^#|@~]/,punctuation:/[(){}\[\].:,;]/},t.languages.sml["class-name"][0].inside=t.languages.sml,t.languages.smlnj=t.languages.sml})(e)}uw.displayName="solidity";uw.aliases=["sol"];function uw(e){e.register(zt),e.languages.solidity=e.languages.extend("clike",{"class-name":{pattern:/(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,lookbehind:!0},keyword:/\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|from|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,operator:/=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/}),e.languages.insertBefore("solidity","keyword",{builtin:/\b(?:address|bool|byte|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|string|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/}),e.languages.insertBefore("solidity","number",{version:{pattern:/([<>]=?|\^)\d+\.\d+\.\d+\b/,lookbehind:!0,alias:"number"}}),e.languages.sol=e.languages.solidity}dw.displayName="solution-file";dw.aliases=["sln"];function dw(e){(function(t){var n={pattern:/\{[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}\}/i,alias:"constant",inside:{punctuation:/[{}]/}};t.languages["solution-file"]={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0,inside:{guid:n}},object:{pattern:/^([ \t]*)(?:([A-Z]\w*)\b(?=.*(?:\r\n?|\n)(?:\1[ \t].*(?:\r\n?|\n))*\1End\2(?=[ \t]*$))|End[A-Z]\w*(?=[ \t]*$))/m,lookbehind:!0,greedy:!0,alias:"keyword"},property:{pattern:/^([ \t]*)(?!\s)[^\r\n"#=()]*[^\s"#=()](?=\s*=)/m,lookbehind:!0,inside:{guid:n}},guid:n,number:/\b\d+(?:\.\d+)*\b/,boolean:/\b(?:FALSE|TRUE)\b/,operator:/=/,punctuation:/[(),]/},t.languages.sln=t.languages["solution-file"]})(e)}hw.displayName="soy";hw.aliases=[];function hw(e){e.register(Er),(function(t){var n=/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,s=/\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-F]+\b/;t.languages.soy={comment:[/\/\*[\s\S]*?\*\//,{pattern:/(\s)\/\/.*/,lookbehind:!0,greedy:!0}],"command-arg":{pattern:/(\{+\/?\s*(?:alias|call|delcall|delpackage|deltemplate|namespace|template)\s+)\.?[\w.]+/,lookbehind:!0,alias:"string",inside:{punctuation:/\./}},parameter:{pattern:/(\{+\/?\s*@?param\??\s+)\.?[\w.]+/,lookbehind:!0,alias:"variable"},keyword:[{pattern:/(\{+\/?[^\S\r\n]*)(?:\\[nrt]|alias|call|case|css|default|delcall|delpackage|deltemplate|else(?:if)?|fallbackmsg|for(?:each)?|if(?:empty)?|lb|let|literal|msg|namespace|nil|@?param\??|rb|sp|switch|template|xid)/,lookbehind:!0},/\b(?:any|as|attributes|bool|css|float|html|in|int|js|list|map|null|number|string|uri)\b/],delimiter:{pattern:/^\{+\/?|\/?\}+$/,alias:"punctuation"},property:/\w+(?==)/,variable:{pattern:/\$[^\W\d]\w*(?:\??(?:\.\w+|\[[^\]]+\]))*/,inside:{string:{pattern:n,greedy:!0},number:s,punctuation:/[\[\].?]/}},string:{pattern:n,greedy:!0},function:[/\w+(?=\()/,{pattern:/(\|[^\S\r\n]*)\w+/,lookbehind:!0}],boolean:/\b(?:false|true)\b/,number:s,operator:/\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/,punctuation:/[{}()\[\]|.,:]/},t.hooks.add("before-tokenize",function(a){var o=/\{\{.+?\}\}|\{.+?\}|\s\/\/.*|\/\*[\s\S]*?\*\//g,u="{literal}",c="{/literal}",d=!1;t.languages["markup-templating"].buildPlaceholders(a,"soy",o,function(h){return h===c&&(d=!1),d?!1:(h===u&&(d=!0),!0)})}),t.hooks.add("after-tokenize",function(a){t.languages["markup-templating"].tokenizePlaceholders(a,"soy")})})(e)}ng.displayName="turtle";ng.aliases=["trig"];function ng(e){e.languages.turtle={comment:{pattern:/#.*/,greedy:!0},"multiline-string":{pattern:/"""(?:(?:""?)?(?:[^"\\]|\\.))*"""|'''(?:(?:''?)?(?:[^'\\]|\\.))*'''/,greedy:!0,alias:"string",inside:{comment:/#.*/}},string:{pattern:/"(?:[^\\"\r\n]|\\.)*"|'(?:[^\\'\r\n]|\\.)*'/,greedy:!0},url:{pattern:/<(?:[^\x00-\x20<>"{}|^`\\]|\\(?:u[\da-fA-F]{4}|U[\da-fA-F]{8}))*>/,greedy:!0,inside:{punctuation:/[<>]/}},function:{pattern:/(?:(?![-.\d\xB7])[-.\w\xB7\xC0-\uFFFD]+)?:(?:(?![-.])(?:[-.:\w\xC0-\uFFFD]|%[\da-f]{2}|\\.)+)?/i,inside:{"local-name":{pattern:/([^:]*:)[\s\S]+/,lookbehind:!0},prefix:{pattern:/[\s\S]+/,inside:{punctuation:/:/}}}},number:/[+-]?\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[{}.,;()[\]]|\^\^/,boolean:/\b(?:false|true)\b/,keyword:[/(?:\ba|@prefix|@base)\b|=/,/\b(?:base|graph|prefix)\b/i],tag:{pattern:/@[a-z]+(?:-[a-z\d]+)*/i,inside:{punctuation:/@/}}},e.languages.trig=e.languages.turtle}fw.displayName="sparql";fw.aliases=["rq"];function fw(e){e.register(ng),e.languages.sparql=e.languages.extend("turtle",{boolean:/\b(?:false|true)\b/i,variable:{pattern:/[?$]\w+/,greedy:!0}}),e.languages.insertBefore("sparql","punctuation",{keyword:[/\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i,/\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|REGEX|REPLACE|ROUND|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i,/\b(?:BASE|GRAPH|PREFIX)\b/i]}),e.languages.rq=e.languages.sparql}pw.displayName="splunk-spl";pw.aliases=[];function pw(e){e.languages["splunk-spl"]={comment:/`comment\("(?:\\.|[^\\"])*"\)`/,string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0},keyword:/\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,"operator-word":{pattern:/\b(?:and|as|by|not|or|xor)\b/i,alias:"operator"},function:/\b\w+(?=\s*\()/,property:/\b\w+(?=\s*=(?!=))/,date:{pattern:/\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,alias:"number"},number:/\b\d+(?:\.\d+)?\b/,boolean:/\b(?:f|false|t|true)\b/i,operator:/[<>=]=?|[-+*/%|]/,punctuation:/[()[\],]/}}mw.displayName="sqf";mw.aliases=[];function mw(e){e.register(zt),e.languages.sqf=e.languages.extend("clike",{string:{pattern:/"(?:(?:"")?[^"])*"(?!")|'(?:[^'])*'/,greedy:!0},keyword:/\b(?:breakOut|breakTo|call|case|catch|default|do|echo|else|execFSM|execVM|exitWith|for|forEach|forEachMember|forEachMemberAgent|forEachMemberTeam|from|goto|if|nil|preprocessFile|preprocessFileLineNumbers|private|scopeName|spawn|step|switch|then|throw|to|try|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?:abs|accTime|acos|action|actionIDs|actionKeys|actionKeysImages|actionKeysNames|actionKeysNamesArray|actionName|actionParams|activateAddons|activatedAddons|activateKey|add3DENConnection|add3DENEventHandler|add3DENLayer|addAction|addBackpack|addBackpackCargo|addBackpackCargoGlobal|addBackpackGlobal|addCamShake|addCuratorAddons|addCuratorCameraArea|addCuratorEditableObjects|addCuratorEditingArea|addCuratorPoints|addEditorObject|addEventHandler|addForce|addForceGeneratorRTD|addGoggles|addGroupIcon|addHandgunItem|addHeadgear|addItem|addItemCargo|addItemCargoGlobal|addItemPool|addItemToBackpack|addItemToUniform|addItemToVest|addLiveStats|addMagazine|addMagazineAmmoCargo|addMagazineCargo|addMagazineCargoGlobal|addMagazineGlobal|addMagazinePool|addMagazines|addMagazineTurret|addMenu|addMenuItem|addMissionEventHandler|addMPEventHandler|addMusicEventHandler|addOwnedMine|addPlayerScores|addPrimaryWeaponItem|addPublicVariableEventHandler|addRating|addResources|addScore|addScoreSide|addSecondaryWeaponItem|addSwitchableUnit|addTeamMember|addToRemainsCollector|addTorque|addUniform|addVehicle|addVest|addWaypoint|addWeapon|addWeaponCargo|addWeaponCargoGlobal|addWeaponGlobal|addWeaponItem|addWeaponPool|addWeaponTurret|admin|agent|agents|AGLToASL|aimedAtTarget|aimPos|airDensityCurveRTD|airDensityRTD|airplaneThrottle|airportSide|AISFinishHeal|alive|all3DENEntities|allAirports|allControls|allCurators|allCutLayers|allDead|allDeadMen|allDisplays|allGroups|allMapMarkers|allMines|allMissionObjects|allow3DMode|allowCrewInImmobile|allowCuratorLogicIgnoreAreas|allowDamage|allowDammage|allowFileOperations|allowFleeing|allowGetIn|allowSprint|allPlayers|allSimpleObjects|allSites|allTurrets|allUnits|allUnitsUAV|allVariables|ammo|ammoOnPylon|animate|animateBay|animateDoor|animatePylon|animateSource|animationNames|animationPhase|animationSourcePhase|animationState|append|apply|armoryPoints|arrayIntersect|asin|ASLToAGL|ASLToATL|assert|assignAsCargo|assignAsCargoIndex|assignAsCommander|assignAsDriver|assignAsGunner|assignAsTurret|assignCurator|assignedCargo|assignedCommander|assignedDriver|assignedGunner|assignedItems|assignedTarget|assignedTeam|assignedVehicle|assignedVehicleRole|assignItem|assignTeam|assignToAirport|atan|atan2|atg|ATLToASL|attachedObject|attachedObjects|attachedTo|attachObject|attachTo|attackEnabled|backpack|backpackCargo|backpackContainer|backpackItems|backpackMagazines|backpackSpaceFor|behaviour|benchmark|binocular|blufor|boundingBox|boundingBoxReal|boundingCenter|briefingName|buildingExit|buildingPos|buldozer_EnableRoadDiag|buldozer_IsEnabledRoadDiag|buldozer_LoadNewRoads|buldozer_reloadOperMap|buttonAction|buttonSetAction|cadetMode|callExtension|camCommand|camCommit|camCommitPrepared|camCommitted|camConstuctionSetParams|camCreate|camDestroy|cameraEffect|cameraEffectEnableHUD|cameraInterest|cameraOn|cameraView|campaignConfigFile|camPreload|camPreloaded|camPrepareBank|camPrepareDir|camPrepareDive|camPrepareFocus|camPrepareFov|camPrepareFovRange|camPreparePos|camPrepareRelPos|camPrepareTarget|camSetBank|camSetDir|camSetDive|camSetFocus|camSetFov|camSetFovRange|camSetPos|camSetRelPos|camSetTarget|camTarget|camUseNVG|canAdd|canAddItemToBackpack|canAddItemToUniform|canAddItemToVest|cancelSimpleTaskDestination|canFire|canMove|canSlingLoad|canStand|canSuspend|canTriggerDynamicSimulation|canUnloadInCombat|canVehicleCargo|captive|captiveNum|cbChecked|cbSetChecked|ceil|channelEnabled|cheatsEnabled|checkAIFeature|checkVisibility|civilian|className|clear3DENAttribute|clear3DENInventory|clearAllItemsFromBackpack|clearBackpackCargo|clearBackpackCargoGlobal|clearForcesRTD|clearGroupIcons|clearItemCargo|clearItemCargoGlobal|clearItemPool|clearMagazineCargo|clearMagazineCargoGlobal|clearMagazinePool|clearOverlay|clearRadio|clearVehicleInit|clearWeaponCargo|clearWeaponCargoGlobal|clearWeaponPool|clientOwner|closeDialog|closeDisplay|closeOverlay|collapseObjectTree|collect3DENHistory|collectiveRTD|combatMode|commandArtilleryFire|commandChat|commander|commandFire|commandFollow|commandFSM|commandGetOut|commandingMenu|commandMove|commandRadio|commandStop|commandSuppressiveFire|commandTarget|commandWatch|comment|commitOverlay|compile|compileFinal|completedFSM|composeText|configClasses|configFile|configHierarchy|configName|configNull|configProperties|configSourceAddonList|configSourceMod|configSourceModList|confirmSensorTarget|connectTerminalToUAV|controlNull|controlsGroupCtrl|copyFromClipboard|copyToClipboard|copyWaypoints|cos|count|countEnemy|countFriendly|countSide|countType|countUnknown|create3DENComposition|create3DENEntity|createAgent|createCenter|createDialog|createDiaryLink|createDiaryRecord|createDiarySubject|createDisplay|createGearDialog|createGroup|createGuardedPoint|createLocation|createMarker|createMarkerLocal|createMenu|createMine|createMissionDisplay|createMPCampaignDisplay|createSimpleObject|createSimpleTask|createSite|createSoundSource|createTask|createTeam|createTrigger|createUnit|createVehicle|createVehicleCrew|createVehicleLocal|crew|ctAddHeader|ctAddRow|ctClear|ctCurSel|ctData|ctFindHeaderRows|ctFindRowHeader|ctHeaderControls|ctHeaderCount|ctRemoveHeaders|ctRemoveRows|ctrlActivate|ctrlAddEventHandler|ctrlAngle|ctrlAutoScrollDelay|ctrlAutoScrollRewind|ctrlAutoScrollSpeed|ctrlChecked|ctrlClassName|ctrlCommit|ctrlCommitted|ctrlCreate|ctrlDelete|ctrlEnable|ctrlEnabled|ctrlFade|ctrlHTMLLoaded|ctrlIDC|ctrlIDD|ctrlMapAnimAdd|ctrlMapAnimClear|ctrlMapAnimCommit|ctrlMapAnimDone|ctrlMapCursor|ctrlMapMouseOver|ctrlMapScale|ctrlMapScreenToWorld|ctrlMapWorldToScreen|ctrlModel|ctrlModelDirAndUp|ctrlModelScale|ctrlParent|ctrlParentControlsGroup|ctrlPosition|ctrlRemoveAllEventHandlers|ctrlRemoveEventHandler|ctrlScale|ctrlSetActiveColor|ctrlSetAngle|ctrlSetAutoScrollDelay|ctrlSetAutoScrollRewind|ctrlSetAutoScrollSpeed|ctrlSetBackgroundColor|ctrlSetChecked|ctrlSetDisabledColor|ctrlSetEventHandler|ctrlSetFade|ctrlSetFocus|ctrlSetFont|ctrlSetFontH1|ctrlSetFontH1B|ctrlSetFontH2|ctrlSetFontH2B|ctrlSetFontH3|ctrlSetFontH3B|ctrlSetFontH4|ctrlSetFontH4B|ctrlSetFontH5|ctrlSetFontH5B|ctrlSetFontH6|ctrlSetFontH6B|ctrlSetFontHeight|ctrlSetFontHeightH1|ctrlSetFontHeightH2|ctrlSetFontHeightH3|ctrlSetFontHeightH4|ctrlSetFontHeightH5|ctrlSetFontHeightH6|ctrlSetFontHeightSecondary|ctrlSetFontP|ctrlSetFontPB|ctrlSetFontSecondary|ctrlSetForegroundColor|ctrlSetModel|ctrlSetModelDirAndUp|ctrlSetModelScale|ctrlSetPixelPrecision|ctrlSetPosition|ctrlSetScale|ctrlSetStructuredText|ctrlSetText|ctrlSetTextColor|ctrlSetTextColorSecondary|ctrlSetTextSecondary|ctrlSetTooltip|ctrlSetTooltipColorBox|ctrlSetTooltipColorShade|ctrlSetTooltipColorText|ctrlShow|ctrlShown|ctrlText|ctrlTextHeight|ctrlTextSecondary|ctrlTextWidth|ctrlType|ctrlVisible|ctRowControls|ctRowCount|ctSetCurSel|ctSetData|ctSetHeaderTemplate|ctSetRowTemplate|ctSetValue|ctValue|curatorAddons|curatorCamera|curatorCameraArea|curatorCameraAreaCeiling|curatorCoef|curatorEditableObjects|curatorEditingArea|curatorEditingAreaType|curatorMouseOver|curatorPoints|curatorRegisteredObjects|curatorSelected|curatorWaypointCost|current3DENOperation|currentChannel|currentCommand|currentMagazine|currentMagazineDetail|currentMagazineDetailTurret|currentMagazineTurret|currentMuzzle|currentNamespace|currentTask|currentTasks|currentThrowable|currentVisionMode|currentWaypoint|currentWeapon|currentWeaponMode|currentWeaponTurret|currentZeroing|cursorObject|cursorTarget|customChat|customRadio|cutFadeOut|cutObj|cutRsc|cutText|damage|date|dateToNumber|daytime|deActivateKey|debriefingText|debugFSM|debugLog|deg|delete3DENEntities|deleteAt|deleteCenter|deleteCollection|deleteEditorObject|deleteGroup|deleteGroupWhenEmpty|deleteIdentity|deleteLocation|deleteMarker|deleteMarkerLocal|deleteRange|deleteResources|deleteSite|deleteStatus|deleteTeam|deleteVehicle|deleteVehicleCrew|deleteWaypoint|detach|detectedMines|diag_activeMissionFSMs|diag_activeScripts|diag_activeSQFScripts|diag_activeSQSScripts|diag_captureFrame|diag_captureFrameToFile|diag_captureSlowFrame|diag_codePerformance|diag_drawMode|diag_dynamicSimulationEnd|diag_enable|diag_enabled|diag_fps|diag_fpsMin|diag_frameNo|diag_lightNewLoad|diag_list|diag_log|diag_logSlowFrame|diag_mergeConfigFile|diag_recordTurretLimits|diag_setLightNew|diag_tickTime|diag_toggle|dialog|diarySubjectExists|didJIP|didJIPOwner|difficulty|difficultyEnabled|difficultyEnabledRTD|difficultyOption|direction|directSay|disableAI|disableCollisionWith|disableConversation|disableDebriefingStats|disableMapIndicators|disableNVGEquipment|disableRemoteSensors|disableSerialization|disableTIEquipment|disableUAVConnectability|disableUserInput|displayAddEventHandler|displayCtrl|displayNull|displayParent|displayRemoveAllEventHandlers|displayRemoveEventHandler|displaySetEventHandler|dissolveTeam|distance|distance2D|distanceSqr|distributionRegion|do3DENAction|doArtilleryFire|doFire|doFollow|doFSM|doGetOut|doMove|doorPhase|doStop|doSuppressiveFire|doTarget|doWatch|drawArrow|drawEllipse|drawIcon|drawIcon3D|drawLine|drawLine3D|drawLink|drawLocation|drawPolygon|drawRectangle|drawTriangle|driver|drop|dynamicSimulationDistance|dynamicSimulationDistanceCoef|dynamicSimulationEnabled|dynamicSimulationSystemEnabled|east|edit3DENMissionAttributes|editObject|editorSetEventHandler|effectiveCommander|emptyPositions|enableAI|enableAIFeature|enableAimPrecision|enableAttack|enableAudioFeature|enableAutoStartUpRTD|enableAutoTrimRTD|enableCamShake|enableCaustics|enableChannel|enableCollisionWith|enableCopilot|enableDebriefingStats|enableDiagLegend|enableDynamicSimulation|enableDynamicSimulationSystem|enableEndDialog|enableEngineArtillery|enableEnvironment|enableFatigue|enableGunLights|enableInfoPanelComponent|enableIRLasers|enableMimics|enablePersonTurret|enableRadio|enableReload|enableRopeAttach|enableSatNormalOnDetail|enableSaving|enableSentences|enableSimulation|enableSimulationGlobal|enableStamina|enableStressDamage|enableTeamSwitch|enableTraffic|enableUAVConnectability|enableUAVWaypoints|enableVehicleCargo|enableVehicleSensor|enableWeaponDisassembly|endl|endLoadingScreen|endMission|engineOn|enginesIsOnRTD|enginesPowerRTD|enginesRpmRTD|enginesTorqueRTD|entities|environmentEnabled|estimatedEndServerTime|estimatedTimeLeft|evalObjectArgument|everyBackpack|everyContainer|exec|execEditorScript|exp|expectedDestination|exportJIPMessages|eyeDirection|eyePos|face|faction|fadeMusic|fadeRadio|fadeSound|fadeSpeech|failMission|fillWeaponsFromPool|find|findCover|findDisplay|findEditorObject|findEmptyPosition|findEmptyPositionReady|findIf|findNearestEnemy|finishMissionInit|finite|fire|fireAtTarget|firstBackpack|flag|flagAnimationPhase|flagOwner|flagSide|flagTexture|fleeing|floor|flyInHeight|flyInHeightASL|fog|fogForecast|fogParams|forceAddUniform|forceAtPositionRTD|forcedMap|forceEnd|forceFlagTexture|forceFollowRoad|forceGeneratorRTD|forceMap|forceRespawn|forceSpeed|forceWalk|forceWeaponFire|forceWeatherChange|forgetTarget|format|formation|formationDirection|formationLeader|formationMembers|formationPosition|formationTask|formatText|formLeader|freeLook|fromEditor|fuel|fullCrew|gearIDCAmmoCount|gearSlotAmmoCount|gearSlotData|get3DENActionState|get3DENAttribute|get3DENCamera|get3DENConnections|get3DENEntity|get3DENEntityID|get3DENGrid|get3DENIconsVisible|get3DENLayerEntities|get3DENLinesVisible|get3DENMissionAttribute|get3DENMouseOver|get3DENSelected|getAimingCoef|getAllEnvSoundControllers|getAllHitPointsDamage|getAllOwnedMines|getAllSoundControllers|getAmmoCargo|getAnimAimPrecision|getAnimSpeedCoef|getArray|getArtilleryAmmo|getArtilleryComputerSettings|getArtilleryETA|getAssignedCuratorLogic|getAssignedCuratorUnit|getBackpackCargo|getBleedingRemaining|getBurningValue|getCameraViewDirection|getCargoIndex|getCenterOfMass|getClientState|getClientStateNumber|getCompatiblePylonMagazines|getConnectedUAV|getContainerMaxLoad|getCursorObjectParams|getCustomAimCoef|getDammage|getDescription|getDir|getDirVisual|getDLCAssetsUsage|getDLCAssetsUsageByName|getDLCs|getDLCUsageTime|getEditorCamera|getEditorMode|getEditorObjectScope|getElevationOffset|getEngineTargetRpmRTD|getEnvSoundController|getFatigue|getFieldManualStartPage|getForcedFlagTexture|getFriend|getFSMVariable|getFuelCargo|getGroupIcon|getGroupIconParams|getGroupIcons|getHideFrom|getHit|getHitIndex|getHitPointDamage|getItemCargo|getMagazineCargo|getMarkerColor|getMarkerPos|getMarkerSize|getMarkerType|getMass|getMissionConfig|getMissionConfigValue|getMissionDLCs|getMissionLayerEntities|getMissionLayers|getModelInfo|getMousePosition|getMusicPlayedTime|getNumber|getObjectArgument|getObjectChildren|getObjectDLC|getObjectMaterials|getObjectProxy|getObjectTextures|getObjectType|getObjectViewDistance|getOxygenRemaining|getPersonUsedDLCs|getPilotCameraDirection|getPilotCameraPosition|getPilotCameraRotation|getPilotCameraTarget|getPlateNumber|getPlayerChannel|getPlayerScores|getPlayerUID|getPlayerUIDOld|getPos|getPosASL|getPosASLVisual|getPosASLW|getPosATL|getPosATLVisual|getPosVisual|getPosWorld|getPylonMagazines|getRelDir|getRelPos|getRemoteSensorsDisabled|getRepairCargo|getResolution|getRotorBrakeRTD|getShadowDistance|getShotParents|getSlingLoad|getSoundController|getSoundControllerResult|getSpeed|getStamina|getStatValue|getSuppression|getTerrainGrid|getTerrainHeightASL|getText|getTotalDLCUsageTime|getTrimOffsetRTD|getUnitLoadout|getUnitTrait|getUserMFDText|getUserMFDValue|getVariable|getVehicleCargo|getWeaponCargo|getWeaponSway|getWingsOrientationRTD|getWingsPositionRTD|getWPPos|glanceAt|globalChat|globalRadio|goggles|group|groupChat|groupFromNetId|groupIconSelectable|groupIconsVisible|groupId|groupOwner|groupRadio|groupSelectedUnits|groupSelectUnit|grpNull|gunner|gusts|halt|handgunItems|handgunMagazine|handgunWeapon|handsHit|hasInterface|hasPilotCamera|hasWeapon|hcAllGroups|hcGroupParams|hcLeader|hcRemoveAllGroups|hcRemoveGroup|hcSelected|hcSelectGroup|hcSetGroup|hcShowBar|hcShownBar|headgear|hideBody|hideObject|hideObjectGlobal|hideSelection|hint|hintC|hintCadet|hintSilent|hmd|hostMission|htmlLoad|HUDMovementLevels|humidity|image|importAllGroups|importance|in|inArea|inAreaArray|incapacitatedState|independent|inflame|inflamed|infoPanel|infoPanelComponentEnabled|infoPanelComponents|infoPanels|inGameUISetEventHandler|inheritsFrom|initAmbientLife|inPolygon|inputAction|inRangeOfArtillery|insertEditorObject|intersect|is3DEN|is3DENMultiplayer|isAbleToBreathe|isAgent|isAimPrecisionEnabled|isArray|isAutoHoverOn|isAutonomous|isAutoStartUpEnabledRTD|isAutotest|isAutoTrimOnRTD|isBleeding|isBurning|isClass|isCollisionLightOn|isCopilotEnabled|isDamageAllowed|isDedicated|isDLCAvailable|isEngineOn|isEqualTo|isEqualType|isEqualTypeAll|isEqualTypeAny|isEqualTypeArray|isEqualTypeParams|isFilePatchingEnabled|isFlashlightOn|isFlatEmpty|isForcedWalk|isFormationLeader|isGroupDeletedWhenEmpty|isHidden|isInRemainsCollector|isInstructorFigureEnabled|isIRLaserOn|isKeyActive|isKindOf|isLaserOn|isLightOn|isLocalized|isManualFire|isMarkedForCollection|isMultiplayer|isMultiplayerSolo|isNil|isNull|isNumber|isObjectHidden|isObjectRTD|isOnRoad|isPipEnabled|isPlayer|isRealTime|isRemoteExecuted|isRemoteExecutedJIP|isServer|isShowing3DIcons|isSimpleObject|isSprintAllowed|isStaminaEnabled|isSteamMission|isStreamFriendlyUIEnabled|isStressDamageEnabled|isText|isTouchingGround|isTurnedOut|isTutHintsEnabled|isUAVConnectable|isUAVConnected|isUIContext|isUniformAllowed|isVehicleCargo|isVehicleRadarOn|isVehicleSensorEnabled|isWalking|isWeaponDeployed|isWeaponRested|itemCargo|items|itemsWithMagazines|join|joinAs|joinAsSilent|joinSilent|joinString|kbAddDatabase|kbAddDatabaseTargets|kbAddTopic|kbHasTopic|kbReact|kbRemoveTopic|kbTell|kbWasSaid|keyImage|keyName|knowsAbout|land|landAt|landResult|language|laserTarget|lbAdd|lbClear|lbColor|lbColorRight|lbCurSel|lbData|lbDelete|lbIsSelected|lbPicture|lbPictureRight|lbSelection|lbSetColor|lbSetColorRight|lbSetCurSel|lbSetData|lbSetPicture|lbSetPictureColor|lbSetPictureColorDisabled|lbSetPictureColorSelected|lbSetPictureRight|lbSetPictureRightColor|lbSetPictureRightColorDisabled|lbSetPictureRightColorSelected|lbSetSelectColor|lbSetSelectColorRight|lbSetSelected|lbSetText|lbSetTextRight|lbSetTooltip|lbSetValue|lbSize|lbSort|lbSortByValue|lbText|lbTextRight|lbValue|leader|leaderboardDeInit|leaderboardGetRows|leaderboardInit|leaderboardRequestRowsFriends|leaderboardRequestRowsGlobal|leaderboardRequestRowsGlobalAroundUser|leaderboardsRequestUploadScore|leaderboardsRequestUploadScoreKeepBest|leaderboardState|leaveVehicle|libraryCredits|libraryDisclaimers|lifeState|lightAttachObject|lightDetachObject|lightIsOn|lightnings|limitSpeed|linearConversion|lineBreak|lineIntersects|lineIntersectsObjs|lineIntersectsSurfaces|lineIntersectsWith|linkItem|list|listObjects|listRemoteTargets|listVehicleSensors|ln|lnbAddArray|lnbAddColumn|lnbAddRow|lnbClear|lnbColor|lnbColorRight|lnbCurSelRow|lnbData|lnbDeleteColumn|lnbDeleteRow|lnbGetColumnsPosition|lnbPicture|lnbPictureRight|lnbSetColor|lnbSetColorRight|lnbSetColumnsPos|lnbSetCurSelRow|lnbSetData|lnbSetPicture|lnbSetPictureColor|lnbSetPictureColorRight|lnbSetPictureColorSelected|lnbSetPictureColorSelectedRight|lnbSetPictureRight|lnbSetText|lnbSetTextRight|lnbSetValue|lnbSize|lnbSort|lnbSortByValue|lnbText|lnbTextRight|lnbValue|load|loadAbs|loadBackpack|loadFile|loadGame|loadIdentity|loadMagazine|loadOverlay|loadStatus|loadUniform|loadVest|local|localize|locationNull|locationPosition|lock|lockCameraTo|lockCargo|lockDriver|locked|lockedCargo|lockedDriver|lockedTurret|lockIdentity|lockTurret|lockWP|log|logEntities|logNetwork|logNetworkTerminate|lookAt|lookAtPos|magazineCargo|magazines|magazinesAllTurrets|magazinesAmmo|magazinesAmmoCargo|magazinesAmmoFull|magazinesDetail|magazinesDetailBackpack|magazinesDetailUniform|magazinesDetailVest|magazinesTurret|magazineTurretAmmo|mapAnimAdd|mapAnimClear|mapAnimCommit|mapAnimDone|mapCenterOnCamera|mapGridPosition|markAsFinishedOnSteam|markerAlpha|markerBrush|markerColor|markerDir|markerPos|markerShape|markerSize|markerText|markerType|max|members|menuAction|menuAdd|menuChecked|menuClear|menuCollapse|menuData|menuDelete|menuEnable|menuEnabled|menuExpand|menuHover|menuPicture|menuSetAction|menuSetCheck|menuSetData|menuSetPicture|menuSetValue|menuShortcut|menuShortcutText|menuSize|menuSort|menuText|menuURL|menuValue|min|mineActive|mineDetectedBy|missionConfigFile|missionDifficulty|missionName|missionNamespace|missionStart|missionVersion|modelToWorld|modelToWorldVisual|modelToWorldVisualWorld|modelToWorldWorld|modParams|moonIntensity|moonPhase|morale|move|move3DENCamera|moveInAny|moveInCargo|moveInCommander|moveInDriver|moveInGunner|moveInTurret|moveObjectToEnd|moveOut|moveTime|moveTo|moveToCompleted|moveToFailed|musicVolume|name|nameSound|nearEntities|nearestBuilding|nearestLocation|nearestLocations|nearestLocationWithDubbing|nearestObject|nearestObjects|nearestTerrainObjects|nearObjects|nearObjectsReady|nearRoads|nearSupplies|nearTargets|needReload|netId|netObjNull|newOverlay|nextMenuItemIndex|nextWeatherChange|nMenuItems|numberOfEnginesRTD|numberToDate|objectCurators|objectFromNetId|objectParent|objNull|objStatus|onBriefingGear|onBriefingGroup|onBriefingNotes|onBriefingPlan|onBriefingTeamSwitch|onCommandModeChanged|onDoubleClick|onEachFrame|onGroupIconClick|onGroupIconOverEnter|onGroupIconOverLeave|onHCGroupSelectionChanged|onMapSingleClick|onPlayerConnected|onPlayerDisconnected|onPreloadFinished|onPreloadStarted|onShowNewObject|onTeamSwitch|openCuratorInterface|openDLCPage|openDSInterface|openMap|openSteamApp|openYoutubeVideo|opfor|orderGetIn|overcast|overcastForecast|owner|param|params|parseNumber|parseSimpleArray|parseText|parsingNamespace|particlesQuality|pi|pickWeaponPool|pitch|pixelGrid|pixelGridBase|pixelGridNoUIScale|pixelH|pixelW|playableSlotsNumber|playableUnits|playAction|playActionNow|player|playerRespawnTime|playerSide|playersNumber|playGesture|playMission|playMove|playMoveNow|playMusic|playScriptedMission|playSound|playSound3D|position|positionCameraToWorld|posScreenToWorld|posWorldToScreen|ppEffectAdjust|ppEffectCommit|ppEffectCommitted|ppEffectCreate|ppEffectDestroy|ppEffectEnable|ppEffectEnabled|ppEffectForceInNVG|precision|preloadCamera|preloadObject|preloadSound|preloadTitleObj|preloadTitleRsc|primaryWeapon|primaryWeaponItems|primaryWeaponMagazine|priority|processDiaryLink|processInitCommands|productVersion|profileName|profileNamespace|profileNameSteam|progressLoadingScreen|progressPosition|progressSetPosition|publicVariable|publicVariableClient|publicVariableServer|pushBack|pushBackUnique|putWeaponPool|queryItemsPool|queryMagazinePool|queryWeaponPool|rad|radioChannelAdd|radioChannelCreate|radioChannelRemove|radioChannelSetCallSign|radioChannelSetLabel|radioVolume|rain|rainbow|random|rank|rankId|rating|rectangular|registeredTasks|registerTask|reload|reloadEnabled|remoteControl|remoteExec|remoteExecCall|remoteExecutedOwner|remove3DENConnection|remove3DENEventHandler|remove3DENLayer|removeAction|removeAll3DENEventHandlers|removeAllActions|removeAllAssignedItems|removeAllContainers|removeAllCuratorAddons|removeAllCuratorCameraAreas|removeAllCuratorEditingAreas|removeAllEventHandlers|removeAllHandgunItems|removeAllItems|removeAllItemsWithMagazines|removeAllMissionEventHandlers|removeAllMPEventHandlers|removeAllMusicEventHandlers|removeAllOwnedMines|removeAllPrimaryWeaponItems|removeAllWeapons|removeBackpack|removeBackpackGlobal|removeCuratorAddons|removeCuratorCameraArea|removeCuratorEditableObjects|removeCuratorEditingArea|removeDrawIcon|removeDrawLinks|removeEventHandler|removeFromRemainsCollector|removeGoggles|removeGroupIcon|removeHandgunItem|removeHeadgear|removeItem|removeItemFromBackpack|removeItemFromUniform|removeItemFromVest|removeItems|removeMagazine|removeMagazineGlobal|removeMagazines|removeMagazinesTurret|removeMagazineTurret|removeMenuItem|removeMissionEventHandler|removeMPEventHandler|removeMusicEventHandler|removeOwnedMine|removePrimaryWeaponItem|removeSecondaryWeaponItem|removeSimpleTask|removeSwitchableUnit|removeTeamMember|removeUniform|removeVest|removeWeapon|removeWeaponAttachmentCargo|removeWeaponCargo|removeWeaponGlobal|removeWeaponTurret|reportRemoteTarget|requiredVersion|resetCamShake|resetSubgroupDirection|resistance|resize|resources|respawnVehicle|restartEditorCamera|reveal|revealMine|reverse|reversedMouseY|roadAt|roadsConnectedTo|roleDescription|ropeAttachedObjects|ropeAttachedTo|ropeAttachEnabled|ropeAttachTo|ropeCreate|ropeCut|ropeDestroy|ropeDetach|ropeEndPosition|ropeLength|ropes|ropeUnwind|ropeUnwound|rotorsForcesRTD|rotorsRpmRTD|round|runInitScript|safeZoneH|safeZoneW|safeZoneWAbs|safeZoneX|safeZoneXAbs|safeZoneY|save3DENInventory|saveGame|saveIdentity|saveJoysticks|saveOverlay|saveProfileNamespace|saveStatus|saveVar|savingEnabled|say|say2D|say3D|score|scoreSide|screenshot|screenToWorld|scriptDone|scriptName|scriptNull|scudState|secondaryWeapon|secondaryWeaponItems|secondaryWeaponMagazine|select|selectBestPlaces|selectDiarySubject|selectedEditorObjects|selectEditorObject|selectionNames|selectionPosition|selectLeader|selectMax|selectMin|selectNoPlayer|selectPlayer|selectRandom|selectRandomWeighted|selectWeapon|selectWeaponTurret|sendAUMessage|sendSimpleCommand|sendTask|sendTaskResult|sendUDPMessage|serverCommand|serverCommandAvailable|serverCommandExecutable|serverName|serverTime|set|set3DENAttribute|set3DENAttributes|set3DENGrid|set3DENIconsVisible|set3DENLayer|set3DENLinesVisible|set3DENLogicType|set3DENMissionAttribute|set3DENMissionAttributes|set3DENModelsVisible|set3DENObjectType|set3DENSelected|setAccTime|setActualCollectiveRTD|setAirplaneThrottle|setAirportSide|setAmmo|setAmmoCargo|setAmmoOnPylon|setAnimSpeedCoef|setAperture|setApertureNew|setArmoryPoints|setAttributes|setAutonomous|setBehaviour|setBleedingRemaining|setBrakesRTD|setCameraInterest|setCamShakeDefParams|setCamShakeParams|setCamUseTI|setCaptive|setCenterOfMass|setCollisionLight|setCombatMode|setCompassOscillation|setConvoySeparation|setCuratorCameraAreaCeiling|setCuratorCoef|setCuratorEditingAreaType|setCuratorWaypointCost|setCurrentChannel|setCurrentTask|setCurrentWaypoint|setCustomAimCoef|setCustomWeightRTD|setDamage|setDammage|setDate|setDebriefingText|setDefaultCamera|setDestination|setDetailMapBlendPars|setDir|setDirection|setDrawIcon|setDriveOnPath|setDropInterval|setDynamicSimulationDistance|setDynamicSimulationDistanceCoef|setEditorMode|setEditorObjectScope|setEffectCondition|setEngineRpmRTD|setFace|setFaceAnimation|setFatigue|setFeatureType|setFlagAnimationPhase|setFlagOwner|setFlagSide|setFlagTexture|setFog|setForceGeneratorRTD|setFormation|setFormationTask|setFormDir|setFriend|setFromEditor|setFSMVariable|setFuel|setFuelCargo|setGroupIcon|setGroupIconParams|setGroupIconsSelectable|setGroupIconsVisible|setGroupId|setGroupIdGlobal|setGroupOwner|setGusts|setHideBehind|setHit|setHitIndex|setHitPointDamage|setHorizonParallaxCoef|setHUDMovementLevels|setIdentity|setImportance|setInfoPanel|setLeader|setLightAmbient|setLightAttenuation|setLightBrightness|setLightColor|setLightDayLight|setLightFlareMaxDistance|setLightFlareSize|setLightIntensity|setLightnings|setLightUseFlare|setLocalWindParams|setMagazineTurretAmmo|setMarkerAlpha|setMarkerAlphaLocal|setMarkerBrush|setMarkerBrushLocal|setMarkerColor|setMarkerColorLocal|setMarkerDir|setMarkerDirLocal|setMarkerPos|setMarkerPosLocal|setMarkerShape|setMarkerShapeLocal|setMarkerSize|setMarkerSizeLocal|setMarkerText|setMarkerTextLocal|setMarkerType|setMarkerTypeLocal|setMass|setMimic|setMousePosition|setMusicEffect|setMusicEventHandler|setName|setNameSound|setObjectArguments|setObjectMaterial|setObjectMaterialGlobal|setObjectProxy|setObjectTexture|setObjectTextureGlobal|setObjectViewDistance|setOvercast|setOwner|setOxygenRemaining|setParticleCircle|setParticleClass|setParticleFire|setParticleParams|setParticleRandom|setPilotCameraDirection|setPilotCameraRotation|setPilotCameraTarget|setPilotLight|setPiPEffect|setPitch|setPlateNumber|setPlayable|setPlayerRespawnTime|setPos|setPosASL|setPosASL2|setPosASLW|setPosATL|setPosition|setPosWorld|setPylonLoadOut|setPylonsPriority|setRadioMsg|setRain|setRainbow|setRandomLip|setRank|setRectangular|setRepairCargo|setRotorBrakeRTD|setShadowDistance|setShotParents|setSide|setSimpleTaskAlwaysVisible|setSimpleTaskCustomData|setSimpleTaskDescription|setSimpleTaskDestination|setSimpleTaskTarget|setSimpleTaskType|setSimulWeatherLayers|setSize|setSkill|setSlingLoad|setSoundEffect|setSpeaker|setSpeech|setSpeedMode|setStamina|setStaminaScheme|setStatValue|setSuppression|setSystemOfUnits|setTargetAge|setTaskMarkerOffset|setTaskResult|setTaskState|setTerrainGrid|setText|setTimeMultiplier|setTitleEffect|setToneMapping|setToneMappingParams|setTrafficDensity|setTrafficDistance|setTrafficGap|setTrafficSpeed|setTriggerActivation|setTriggerArea|setTriggerStatements|setTriggerText|setTriggerTimeout|setTriggerType|setType|setUnconscious|setUnitAbility|setUnitLoadout|setUnitPos|setUnitPosWeak|setUnitRank|setUnitRecoilCoefficient|setUnitTrait|setUnloadInCombat|setUserActionText|setUserMFDText|setUserMFDValue|setVariable|setVectorDir|setVectorDirAndUp|setVectorUp|setVehicleAmmo|setVehicleAmmoDef|setVehicleArmor|setVehicleCargo|setVehicleId|setVehicleInit|setVehicleLock|setVehiclePosition|setVehicleRadar|setVehicleReceiveRemoteTargets|setVehicleReportOwnPosition|setVehicleReportRemoteTargets|setVehicleTIPars|setVehicleVarName|setVelocity|setVelocityModelSpace|setVelocityTransformation|setViewDistance|setVisibleIfTreeCollapsed|setWantedRpmRTD|setWaves|setWaypointBehaviour|setWaypointCombatMode|setWaypointCompletionRadius|setWaypointDescription|setWaypointForceBehaviour|setWaypointFormation|setWaypointHousePosition|setWaypointLoiterRadius|setWaypointLoiterType|setWaypointName|setWaypointPosition|setWaypointScript|setWaypointSpeed|setWaypointStatements|setWaypointTimeout|setWaypointType|setWaypointVisible|setWeaponReloadingTime|setWind|setWindDir|setWindForce|setWindStr|setWingForceScaleRTD|setWPPos|show3DIcons|showChat|showCinemaBorder|showCommandingMenu|showCompass|showCuratorCompass|showGPS|showHUD|showLegend|showMap|shownArtilleryComputer|shownChat|shownCompass|shownCuratorCompass|showNewEditorObject|shownGPS|shownHUD|shownMap|shownPad|shownRadio|shownScoretable|shownUAVFeed|shownWarrant|shownWatch|showPad|showRadio|showScoretable|showSubtitles|showUAVFeed|showWarrant|showWatch|showWaypoint|showWaypoints|side|sideAmbientLife|sideChat|sideEmpty|sideEnemy|sideFriendly|sideLogic|sideRadio|sideUnknown|simpleTasks|simulationEnabled|simulCloudDensity|simulCloudOcclusion|simulInClouds|simulWeatherSync|sin|size|sizeOf|skill|skillFinal|skipTime|sleep|sliderPosition|sliderRange|sliderSetPosition|sliderSetRange|sliderSetSpeed|sliderSpeed|slingLoadAssistantShown|soldierMagazines|someAmmo|sort|soundVolume|speaker|speed|speedMode|splitString|sqrt|squadParams|stance|startLoadingScreen|stop|stopEngineRTD|stopped|str|sunOrMoon|supportInfo|suppressFor|surfaceIsWater|surfaceNormal|surfaceType|swimInDepth|switchableUnits|switchAction|switchCamera|switchGesture|switchLight|switchMove|synchronizedObjects|synchronizedTriggers|synchronizedWaypoints|synchronizeObjectsAdd|synchronizeObjectsRemove|synchronizeTrigger|synchronizeWaypoint|systemChat|systemOfUnits|tan|targetKnowledge|targets|targetsAggregate|targetsQuery|taskAlwaysVisible|taskChildren|taskCompleted|taskCustomData|taskDescription|taskDestination|taskHint|taskMarkerOffset|taskNull|taskParent|taskResult|taskState|taskType|teamMember|teamMemberNull|teamName|teams|teamSwitch|teamSwitchEnabled|teamType|terminate|terrainIntersect|terrainIntersectASL|terrainIntersectAtASL|text|textLog|textLogFormat|tg|time|timeMultiplier|titleCut|titleFadeOut|titleObj|titleRsc|titleText|toArray|toFixed|toLower|toString|toUpper|triggerActivated|triggerActivation|triggerArea|triggerAttachedVehicle|triggerAttachObject|triggerAttachVehicle|triggerDynamicSimulation|triggerStatements|triggerText|triggerTimeout|triggerTimeoutCurrent|triggerType|turretLocal|turretOwner|turretUnit|tvAdd|tvClear|tvCollapse|tvCollapseAll|tvCount|tvCurSel|tvData|tvDelete|tvExpand|tvExpandAll|tvPicture|tvPictureRight|tvSetColor|tvSetCurSel|tvSetData|tvSetPicture|tvSetPictureColor|tvSetPictureColorDisabled|tvSetPictureColorSelected|tvSetPictureRight|tvSetPictureRightColor|tvSetPictureRightColorDisabled|tvSetPictureRightColorSelected|tvSetSelectColor|tvSetText|tvSetTooltip|tvSetValue|tvSort|tvSortByValue|tvText|tvTooltip|tvValue|type|typeName|typeOf|UAVControl|uiNamespace|uiSleep|unassignCurator|unassignItem|unassignTeam|unassignVehicle|underwater|uniform|uniformContainer|uniformItems|uniformMagazines|unitAddons|unitAimPosition|unitAimPositionVisual|unitBackpack|unitIsUAV|unitPos|unitReady|unitRecoilCoefficient|units|unitsBelowHeight|unlinkItem|unlockAchievement|unregisterTask|updateDrawIcon|updateMenuItem|updateObjectTree|useAIOperMapObstructionTest|useAISteeringComponent|useAudioTimeForMoves|userInputDisabled|vectorAdd|vectorCos|vectorCrossProduct|vectorDiff|vectorDir|vectorDirVisual|vectorDistance|vectorDistanceSqr|vectorDotProduct|vectorFromTo|vectorMagnitude|vectorMagnitudeSqr|vectorModelToWorld|vectorModelToWorldVisual|vectorMultiply|vectorNormalized|vectorUp|vectorUpVisual|vectorWorldToModel|vectorWorldToModelVisual|vehicle|vehicleCargoEnabled|vehicleChat|vehicleRadio|vehicleReceiveRemoteTargets|vehicleReportOwnPosition|vehicleReportRemoteTargets|vehicles|vehicleVarName|velocity|velocityModelSpace|verifySignature|vest|vestContainer|vestItems|vestMagazines|viewDistance|visibleCompass|visibleGPS|visibleMap|visiblePosition|visiblePositionASL|visibleScoretable|visibleWatch|waitUntil|waves|waypointAttachedObject|waypointAttachedVehicle|waypointAttachObject|waypointAttachVehicle|waypointBehaviour|waypointCombatMode|waypointCompletionRadius|waypointDescription|waypointForceBehaviour|waypointFormation|waypointHousePosition|waypointLoiterRadius|waypointLoiterType|waypointName|waypointPosition|waypoints|waypointScript|waypointsEnabledUAV|waypointShow|waypointSpeed|waypointStatements|waypointTimeout|waypointTimeoutCurrent|waypointType|waypointVisible|weaponAccessories|weaponAccessoriesCargo|weaponCargo|weaponDirection|weaponInertia|weaponLowered|weapons|weaponsItems|weaponsItemsCargo|weaponState|weaponsTurret|weightRTD|west|WFSideText|wind|windDir|windRTD|windStr|wingsForcesRTD|worldName|worldSize|worldToModel|worldToModelVisual|worldToScreen)\b/i,number:/(?:\$|\b0x)[\da-f]+\b|(?:\B\.\d+|\b\d+(?:\.\d+)?)(?:e[+-]?\d+)?\b/i,operator:/##|>>|&&|\|\||[!=<>]=?|[-+*/%#^]|\b(?:and|mod|not|or)\b/i,"magic-variable":{pattern:/\b(?:this|thisList|thisTrigger|_exception|_fnc_scriptName|_fnc_scriptNameParent|_forEachIndex|_this|_thisEventHandler|_thisFSM|_thisScript|_x)\b/i,alias:"keyword"},constant:/\bDIK(?:_[a-z\d]+)+\b/i}),e.languages.insertBefore("sqf","string",{macro:{pattern:/(^[ \t]*)#[a-z](?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{directive:{pattern:/#[a-z]+\b/i,alias:"keyword"},comment:e.languages.sqf.comment}}}),delete e.languages.sqf["class-name"]}gw.displayName="squirrel";gw.aliases=[];function gw(e){e.register(zt),e.languages.squirrel=e.languages.extend("clike",{comment:[e.languages.clike.comment[0],{pattern:/(^|[^\\:])(?:\/\/|#).*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^\\"'@])(?:@"(?:[^"]|"")*"(?!")|"(?:[^\\\r\n"]|\\.)*")/,lookbehind:!0,greedy:!0},"class-name":{pattern:/(\b(?:class|enum|extends|instanceof)\s+)\w+(?:\.\w+)*/,lookbehind:!0,inside:{punctuation:/\./}},keyword:/\b(?:__FILE__|__LINE__|base|break|case|catch|class|clone|const|constructor|continue|default|delete|else|enum|extends|for|foreach|function|if|in|instanceof|local|null|resume|return|static|switch|this|throw|try|typeof|while|yield)\b/,number:/\b(?:0x[0-9a-fA-F]+|\d+(?:\.(?:\d+|[eE][+-]?\d+))?)\b/,operator:/\+\+|--|<=>|<[-<]|>>>?|&&?|\|\|?|[-+*/%!=<>]=?|[~^]|::?/,punctuation:/[(){}\[\],;.]/}),e.languages.insertBefore("squirrel","string",{char:{pattern:/(^|[^\\"'])'(?:[^\\']|\\(?:[xuU][0-9a-fA-F]{0,8}|[\s\S]))'/,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("squirrel","operator",{"attribute-punctuation":{pattern:/<\/|\/>/,alias:"important"},lambda:{pattern:/@(?=\()/,alias:"operator"}})}bw.displayName="stan";bw.aliases=[];function bw(e){(function(t){var n=/\b(?:algebra_solver|algebra_solver_newton|integrate_1d|integrate_ode|integrate_ode_bdf|integrate_ode_rk45|map_rect|ode_(?:adams|bdf|ckrk|rk45)(?:_tol)?|ode_adjoint_tol_ctl|reduce_sum|reduce_sum_static)\b/;t.languages.stan={comment:/\/\/.*|\/\*[\s\S]*?\*\/|#(?!include).*/,string:{pattern:/"[\x20\x21\x23-\x5B\x5D-\x7E]*"/,greedy:!0},directive:{pattern:/^([ \t]*)#include\b.*/m,lookbehind:!0,alias:"property"},"function-arg":{pattern:RegExp("("+n.source+/\s*\(\s*/.source+")"+/[a-zA-Z]\w*/.source),lookbehind:!0,alias:"function"},constraint:{pattern:/(\b(?:int|matrix|real|row_vector|vector)\s*)<[^<>]*>/,lookbehind:!0,inside:{expression:{pattern:/(=\s*)\S(?:\S|\s+(?!\s))*?(?=\s*(?:>$|,\s*\w+\s*=))/,lookbehind:!0,inside:null},property:/\b[a-z]\w*(?=\s*=)/i,operator:/=/,punctuation:/^<|>$|,/}},keyword:[{pattern:/\bdata(?=\s*\{)|\b(?:functions|generated|model|parameters|quantities|transformed)\b/,alias:"program-block"},/\b(?:array|break|cholesky_factor_corr|cholesky_factor_cov|complex|continue|corr_matrix|cov_matrix|data|else|for|if|in|increment_log_prob|int|matrix|ordered|positive_ordered|print|real|reject|return|row_vector|simplex|target|unit_vector|vector|void|while)\b/,n],function:/\b[a-z]\w*(?=\s*\()/i,number:/(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:E[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,boolean:/\b(?:false|true)\b/,operator:/<-|\.[*/]=?|\|\|?|&&|[!=<>+\-*/]=?|['^%~?:]/,punctuation:/[()\[\]{},;]/},t.languages.stan.constraint.inside.expression.inside=t.languages.stan})(e)}xw.displayName="stata";xw.aliases=[];function xw(e){e.register(Oo),e.register(eg),e.register(eh),e.languages.stata={comment:[{pattern:/(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|\s)\/\/.*|\/\*[\s\S]*?\*\//,lookbehind:!0,greedy:!0}],"string-literal":{pattern:/"[^"\r\n]*"|[‘`']".*?"[’`']/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}]*\}|[‘`']\w[^’`'\r\n]*[’`']/,inside:{punctuation:/^\$\{|\}$/,expression:{pattern:/[\s\S]+/,inside:null}}},string:/[\s\S]+/}},mata:{pattern:/(^[ \t]*mata[ \t]*:)[\s\S]+?(?=^end\b)/m,lookbehind:!0,greedy:!0,alias:"language-mata",inside:e.languages.mata},java:{pattern:/(^[ \t]*java[ \t]*:)[\s\S]+?(?=^end\b)/m,lookbehind:!0,greedy:!0,alias:"language-java",inside:e.languages.java},python:{pattern:/(^[ \t]*python[ \t]*:)[\s\S]+?(?=^end\b)/m,lookbehind:!0,greedy:!0,alias:"language-python",inside:e.languages.python},command:{pattern:/(^[ \t]*(?:\.[ \t]+)?(?:(?:bayes|bootstrap|by|bysort|capture|collect|fmm|fp|frame|jackknife|mfp|mi|nestreg|noisily|permute|quietly|rolling|simulate|statsby|stepwise|svy|version|xi)\b[^:\r\n]*:[ \t]*|(?:capture|noisily|quietly|version)[ \t]+)?)[a-zA-Z]\w*/m,lookbehind:!0,greedy:!0,alias:"keyword"},variable:/\$\w+|[‘`']\w[^’`'\r\n]*[’`']/,keyword:/\b(?:bayes|bootstrap|by|bysort|capture|clear|collect|fmm|fp|frame|if|in|jackknife|mi[ \t]+estimate|mfp|nestreg|noisily|of|permute|quietly|rolling|simulate|sort|statsby|stepwise|svy|varlist|version|xi)\b/,boolean:/\b(?:off|on)\b/,number:/\b\d+(?:\.\d+)?\b|\B\.\d+/,function:/\b[a-z_]\w*(?=\()/i,operator:/\+\+|--|##?|[<>!=~]=?|[+\-*^&|/]/,punctuation:/[(){}[\],:]/},e.languages.stata["string-literal"].inside.interpolation.inside.expression.inside=e.languages.stata}vw.displayName="iecst";vw.aliases=[];function vw(e){e.languages.iecst={comment:[{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\(\*[\s\S]*?(?:\*\)|$)|\{[\s\S]*?(?:\}|$))/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:[/\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:ACCESS|CONFIG|EXTERNAL|GLOBAL|INPUT|IN_OUT|OUTPUT|TEMP)|VAR|METHOD|PROPERTY)\b/i,/\b(?:AT|BY|(?:END_)?(?:CASE|FOR|IF|REPEAT|WHILE)|CONSTANT|CONTINUE|DO|ELSE|ELSIF|EXIT|EXTENDS|FROM|GET|GOTO|IMPLEMENTS|JMP|NON_RETAIN|OF|PRIVATE|PROTECTED|PUBLIC|RETAIN|RETURN|SET|TASK|THEN|TO|UNTIL|USING|WITH|__CATCH|__ENDTRY|__FINALLY|__TRY)\b/],"class-name":/\b(?:ANY|ARRAY|BOOL|BYTE|U?(?:D|L|S)?INT|(?:D|L)?WORD|DATE(?:_AND_TIME)?|DT|L?REAL|POINTER|STRING|TIME(?:_OF_DAY)?|TOD)\b/,address:{pattern:/%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/,alias:"symbol"},number:/\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:D|DT|T|TOD)#[\d_shmd:]*|\b[A-Z]*#[\d.,_]*|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/,operator:/S?R?:?=>?|&&?|\*\*?|<[=>]?|>=?|[-:^/+#]|\b(?:AND|EQ|EXPT|GE|GT|LE|LT|MOD|NE|NOT|OR|XOR)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,punctuation:/[()[\].,;]/}}yw.displayName="supercollider";yw.aliases=["sclang"];function yw(e){e.languages.supercollider={comment:{pattern:/\/\/.*|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\//,greedy:!0},string:{pattern:/(^|[^\\])"(?:[^"\\]|\\[\s\S])*"/,lookbehind:!0,greedy:!0},char:{pattern:/\$(?:[^\\\r\n]|\\.)/,greedy:!0},symbol:{pattern:/(^|[^\\])'(?:[^'\\]|\\[\s\S])*'|\\\w+/,lookbehind:!0,greedy:!0},keyword:/\b(?:_|arg|classvar|const|nil|var|while)\b/,boolean:/\b(?:false|true)\b/,label:{pattern:/\b[a-z_]\w*(?=\s*:)/,alias:"property"},number:/\b(?:inf|pi|0x[0-9a-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(?:pi)?|\d+r[0-9a-zA-Z]+(?:\.[0-9a-zA-Z]+)?|\d+[sb]{1,4}\d*)\b/,"class-name":/\b[A-Z]\w*\b/,operator:/\.{2,3}|#(?![[{])|&&|[!=]==?|\+>>|\+{1,3}|-[->]|=>|>>|\?\?|@\|?@|\|(?:@|[!=]=)?\||!\?|<[!=>]|\*{1,2}|<{2,3}\*?|[-!%&/<>?@|=`]/,punctuation:/[{}()[\].:,;]|#[[{]/},e.languages.sclang=e.languages.supercollider}Ew.displayName="systemd";Ew.aliases=[];function Ew(e){(function(t){var n={pattern:/^[;#].*/m,greedy:!0},s=/"(?:[^\r\n"\\]|\\(?:[^\r]|\r\n?))*"(?!\S)/.source;t.languages.systemd={comment:n,section:{pattern:/^\[[^\n\r\[\]]*\](?=[ \t]*$)/m,greedy:!0,inside:{punctuation:/^\[|\]$/,"section-name":{pattern:/[\s\S]+/,alias:"selector"}}},key:{pattern:/^[^\s=]+(?=[ \t]*=)/m,greedy:!0,alias:"attr-name"},value:{pattern:RegExp(/(=[ \t]*(?!\s))/.source+"(?:"+s+`|(?=[^"\r
|
|
@@ -962,7 +962,7 @@ project-root/
|
|
|
962
962
|
│ ├── components/
|
|
963
963
|
│ ├── pages/
|
|
964
964
|
│ └── services/
|
|
965
|
-
\`\`\``,height:800})})]})]})}const xo=w.forwardRef(({className:e,variant:t="default",...n},s)=>{const a="relative w-full rounded-lg border px-4 py-3 text-sm [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",o=t==="destructive"?"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive":"bg-background text-foreground";return r.jsx("div",{ref:s,role:"alert",className:Te(a,o,e),...n})});xo.displayName="Alert";const vo=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:Te("text-sm [&_p]:leading-relaxed",e),...t}));vo.displayName="AlertDescription";const dde=["a2a_v0.2","a2a_v0.1","jsonrpc2","jsonrpc","openrpc","rest"],hde=["GET","POST","PUT","PATCH","DELETE"],fde=()=>({id:"",skill:"",description:"",endpoint:"",method:"POST",enabled:!0,inputMimeType:"application/json",outputMimeType:"application/json",inputSchema:"",outputSchema:""}),Pl={id:"",name:"",description:"",version:"1.0.0",url:"",documentation:"",protocols:["a2a_v0.2"],authentication:{scheme:"api_key",in:"header",name:"X-API-Key",example:"",description:""},capabilities:[],supportedInputTypes:["application/json"],supportedOutputTypes:["application/json"],security:{transport:"https",encryption:"TLS 1.3",notes:""},contact:{name:"",email:""},lastUpdated:void 0},fo=e=>({...e,protocols:[...e.protocols],authentication:{...e.authentication},capabilities:e.capabilities.map(t=>({...t})),supportedInputTypes:[...e.supportedInputTypes],supportedOutputTypes:[...e.supportedOutputTypes],security:{...e.security},contact:{...e.contact}}),Vu=()=>fo(Pl);function pde(e){if(!e)return Vu();const t=Array.isArray(e.protocols)?e.protocols.filter(u=>typeof u=="string"):[],n=Array.isArray(e.supportedContentTypes?.input)?e.supportedContentTypes.input.filter(u=>typeof u=="string"):[],s=Array.isArray(e.supportedContentTypes?.output)?e.supportedContentTypes.output.filter(u=>typeof u=="string"):[],a=Array.isArray(e.capabilities)?e.capabilities.map(u=>({id:typeof u.id=="string"?u.id:"",skill:typeof u.skill=="string"?u.skill:"",description:typeof u.description=="string"?u.description:"",endpoint:typeof u.endpoint=="string"?u.endpoint:"",method:typeof u.method=="string"?u.method:"POST",enabled:u?.enabled!==!1,inputMimeType:typeof u.input?.mimeType=="string"?u.input.mimeType:"application/json",outputMimeType:typeof u.output?.mimeType=="string"?u.output.mimeType:"application/json",inputSchema:u.input?.schema?JSON.stringify(u.input.schema,null,2):"",outputSchema:u.output?.schema?JSON.stringify(u.output.schema,null,2):""})):[],o={scheme:typeof e.authentication?.scheme=="string"?e.authentication.scheme:"api_key",in:typeof e.authentication?.in=="string"?e.authentication.in:"header",name:typeof e.authentication?.name=="string"?e.authentication.name:"X-API-Key",example:typeof e.authentication?.example=="string"?e.authentication.example:"",description:typeof e.authentication?.description=="string"?e.authentication.description:""};return{id:typeof e.id=="string"?e.id:"",name:typeof e.name=="string"?e.name:"",description:typeof e.description=="string"?e.description:"",version:typeof e.version=="string"?e.version:"1.0.0",url:typeof e.url=="string"?e.url:"",documentation:typeof e.documentation=="string"?e.documentation:"",protocols:t.length>0?t:Pl.protocols,authentication:o,capabilities:a,supportedInputTypes:n.length>0?n:Pl.supportedInputTypes,supportedOutputTypes:s.length>0?s:Pl.supportedOutputTypes,security:{transport:typeof e.security?.transport=="string"?e.security.transport:Pl.security.transport,encryption:typeof e.security?.encryption=="string"?e.security.encryption:Pl.security.encryption,notes:typeof e.security?.notes=="string"?e.security.notes:""},contact:{name:typeof e.contact?.name=="string"?e.contact.name:"",email:typeof e.contact?.email=="string"?e.contact.email:""},lastUpdated:typeof e.lastUpdated=="string"?e.lastUpdated:void 0}}function mde(){const{toast:e}=bn(),[t,n]=w.useState(()=>Vu()),[s,a]=w.useState(()=>Vu()),[o,u]=w.useState(!0),[c,d]=w.useState(!1),[h,p]=w.useState(null),[m,g]=w.useState(""),[v,C]=w.useState(""),[S,b]=w.useState(""),[y,E]=w.useState(void 0),[_,N]=w.useState(!1),A=w.useMemo(()=>{const W=new Set([...dde,...t.protocols]);return Array.from(W).sort()},[t.protocols]);w.useEffect(()=>{let W=!0;return(async()=>{u(!0),p(null);try{const se=await fetch(`${Ae}/api/v1/identity/agent-card`);if(!se.ok)throw new Error(`Failed to load agent card (${se.status})`);const K=await se.json();if(K.success&&K.data){const G=pde(K.data.card||void 0);if(G.id||(G.id="urn:agent:coconut"),G.url||(G.url=`${window.location.origin}/api/v1`),G.lastUpdated=K.data.updatedAt??G.lastUpdated,W){const Z=fo(G);n(Z),a(fo(Z)),E(K.data.updatedAt??Z.lastUpdated)}}else{if(K.error)throw new Error(K.error);if(W){const G=Vu();n(G),a(fo(G))}}}catch(se){if(console.error("Failed to fetch agent card",se),W){p(se instanceof Error?se.message:"Failed to load agent identity");const K=Vu();n(K),a(fo(K))}}finally{W&&u(!1)}})(),()=>{W=!1}},[]);const k=(W,ae)=>{n(se=>{const K=ae?[...new Set([...se.protocols,W])]:se.protocols.filter(G=>G!==W);return{...se,protocols:K}})},I=()=>{const W=m.trim();W&&(n(ae=>({...ae,protocols:[...new Set([...ae.protocols,W])]})),g(""))},R=()=>{const W=v.trim();W&&(n(ae=>({...ae,supportedInputTypes:[...new Set([...ae.supportedInputTypes,W])]})),C(""))},M=()=>{const W=S.trim();W&&(n(ae=>({...ae,supportedOutputTypes:[...new Set([...ae.supportedOutputTypes,W])]})),b(""))},L=W=>{n(ae=>({...ae,supportedInputTypes:ae.supportedInputTypes.filter(se=>se!==W)}))},$=W=>{n(ae=>({...ae,supportedOutputTypes:ae.supportedOutputTypes.filter(se=>se!==W)}))},H=(W,ae)=>{n(se=>({...se,[W]:ae}))},B=(W,ae)=>{n(se=>({...se,authentication:{...se.authentication,[W]:ae}}))},z=(W,ae)=>{n(se=>({...se,security:{...se.security,[W]:ae}}))},Q=(W,ae)=>{n(se=>({...se,contact:{...se.contact,[W]:ae}}))},P=()=>{n(W=>({...W,capabilities:[...W.capabilities,fde()]}))},X=(W,ae)=>{n(se=>{const K=[...se.capabilities];return K[W]={...K[W],...ae},{...se,capabilities:K}})},Y=W=>{n(ae=>({...ae,capabilities:ae.capabilities.filter((se,K)=>K!==W)}))},F=()=>{const W=[["id","Agent ID"],["name","Name"],["description","Description"],["version","Version"],["url","Service URL"]];for(const[se,K]of W){const G=t[se];if(typeof G!="string"||!G.trim())throw new Error(`${K} is required`)}const ae=t.capabilities.map((se,K)=>({cap:se,index:K})).filter(({cap:se})=>se.enabled&&se.id.trim()&&se.endpoint.trim()).map(({cap:se,index:K})=>{const G=se.id.trim()||`Capability ${K+1}`,Z={id:se.id.trim(),skill:se.skill.trim(),description:se.description.trim(),endpoint:se.endpoint.trim(),method:se.method||"POST"},ce=(le,ne)=>{if(!(!le||!le.trim()))try{return JSON.parse(le)}catch(pe){throw new Error(`${G} ${ne} schema must be valid JSON. ${pe?.message??pe}`)}};return(se.inputMimeType?.trim()||se.inputSchema?.trim())&&(Z.input={mimeType:se.inputMimeType?.trim()||"application/json",schema:ce(se.inputSchema,"input")}),(se.outputMimeType?.trim()||se.outputSchema?.trim())&&(Z.output={mimeType:se.outputMimeType?.trim()||"application/json",schema:ce(se.outputSchema,"output")}),Z});return{id:t.id.trim(),name:t.name.trim(),description:t.description.trim(),version:t.version.trim(),url:t.url.trim(),documentation:t.documentation.trim()||void 0,protocols:t.protocols,authentication:{scheme:t.authentication.scheme.trim()||"api_key",in:t.authentication.in.trim()||"header",name:t.authentication.name.trim()||"X-API-Key",example:t.authentication.example.trim()||void 0,description:t.authentication.description.trim()||void 0},capabilities:ae,supportedContentTypes:{input:t.supportedInputTypes,output:t.supportedOutputTypes},security:{transport:t.security.transport.trim()||"https",encryption:t.security.encryption.trim()||"TLS 1.3",notes:t.security.notes.trim()||void 0},contact:{name:t.contact.name.trim()||void 0,email:t.contact.email.trim()||void 0},lastUpdated:new Date().toISOString()}},O=async()=>{d(!0),p(null);try{const W=F(),ae=await fetch(`${Ae}/api/v1/identity/agent-card`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({card:W})}),se=await ae.json();if(!ae.ok||!se?.success)throw new Error(se?.error||"Failed to save agent card");e({title:"Agent card saved",description:"The identity card has been updated successfully."});const K=se?.data?.updatedAt??new Date().toISOString();n(G=>{const Z={...G,lastUpdated:K};return a(fo(Z)),Z}),E(K)}catch(W){console.error("Failed to save agent card",W),p(W instanceof Error?W.message:"Failed to save agent card"),e({title:"Save failed",description:W instanceof Error?W.message:"Failed to save agent card, see console for details.",variant:"destructive"})}finally{d(!1)}},V=()=>{n(fo(s)),p(null),g(""),C(""),b(""),E(s.lastUpdated??y)},te=async()=>{try{const W=JSON.stringify(F(),null,2);await navigator.clipboard.writeText(W),N(!0),setTimeout(()=>N(!1),1500),e({title:"Copied!",description:"Agent card JSON copied to clipboard."})}catch(W){console.error("Failed to copy agent card preview:",W),e({title:"Copy failed",description:"Unable to copy agent card JSON to clipboard.",variant:"destructive"})}},U=w.useMemo(()=>{if(!y)return null;try{return new Date(y).toLocaleString()}catch{return null}},[y]);return o?r.jsx("div",{className:"flex h-full items-center justify-center",children:r.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[r.jsx(tn,{className:"h-5 w-5 animate-spin"}),r.jsx("span",{children:"Loading identity card..."})]})}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col justify-between gap-4 md:flex-row md:items-end",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-3xl font-bold",children:"Agent Identity"}),r.jsxs("p",{className:"text-muted-foreground",children:["Manage the"," ",r.jsx("a",{href:"/.well-known/agent-card.json",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-4 hover:text-primary",children:"/.well-known/agent-card.json"})," ","descriptor for A2A discovery."]}),U&&r.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Last updated ",U]})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r.jsxs(re,{variant:"outline",onClick:V,disabled:c,children:[r.jsx(tH,{className:"mr-2 h-4 w-4"}),"Reset"]}),r.jsx(re,{onClick:O,disabled:c,children:c?r.jsxs(r.Fragment,{children:[r.jsx(tn,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):r.jsxs(r.Fragment,{children:[r.jsx(Vr,{className:"mr-2 h-4 w-4"}),"Save Changes"]})})]})]}),h&&r.jsxs(xo,{variant:"destructive",children:[r.jsx("div",{className:"font-semibold",children:"Something went wrong"}),r.jsx(vo,{children:h})]}),r.jsxs(Fm,{defaultValue:"overview",className:"space-y-6",children:[r.jsxs(Xd,{children:[r.jsx(Yr,{value:"overview",children:"Identity Overview"}),r.jsx(Yr,{value:"protocols",children:"Protocols & Content"}),r.jsx(Yr,{value:"auth",children:"Authentication & Security"}),r.jsx(Yr,{value:"capabilities",children:"Capabilities"}),r.jsx(Yr,{value:"contact",children:"Contact"}),r.jsx(Yr,{value:"preview",children:"Preview"})]}),r.jsx(Kr,{value:"overview",children:r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Identity Overview"}),r.jsx(qt,{children:"Define core attributes used for discovery."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"agent-id",children:"Agent Identifier"}),r.jsx(Fe,{id:"agent-id",value:t.id,placeholder:"urn:agent:coconut-dev",onChange:W=>H("id",W.target.value)})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"agent-name",children:"Name"}),r.jsx(Fe,{id:"agent-name",value:t.name,placeholder:"Coconut Development Agent",onChange:W=>H("name",W.target.value)})]})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"agent-version",children:"Version"}),r.jsx(Fe,{id:"agent-version",value:t.version,placeholder:"1.0.0",onChange:W=>H("version",W.target.value)})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"agent-url",children:"Primary Endpoint"}),r.jsx(Fe,{id:"agent-url",value:t.url,placeholder:"https://coconut.dev/api/v1",onChange:W=>H("url",W.target.value)})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"agent-description",children:"Description"}),r.jsx(ar,{id:"agent-description",value:t.description,placeholder:"Agent responsible for managing proposals, plans, and operations...",onChange:W=>H("description",W.target.value),rows:4})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"agent-docs",children:"Documentation URL"}),r.jsx(Fe,{id:"agent-docs",value:t.documentation,placeholder:"https://docs.coconut.dev/a2a",onChange:W=>H("documentation",W.target.value)})]})]})]})}),r.jsx(Kr,{value:"protocols",children:r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Protocols & Content Types"}),r.jsx(qt,{children:"Select supported discovery protocols and payload formats."})]}),r.jsxs(Be,{className:"space-y-6",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Protocols"}),r.jsx("div",{className:"grid gap-2 md:grid-cols-3",children:A.map(W=>r.jsxs("label",{className:"flex items-center gap-2 rounded-md border border-border bg-muted/20 px-3 py-2",children:[r.jsx(ds,{checked:t.protocols.includes(W),onCheckedChange:ae=>k(W,!!ae)}),r.jsx("span",{className:"text-sm font-medium",children:W})]},W))}),r.jsxs("div",{className:"flex flex-col gap-2 md:flex-row",children:[r.jsx(Fe,{value:m,placeholder:"Add custom protocol (press Add)",onChange:W=>g(W.target.value),onKeyDown:W=>{W.key==="Enter"&&(W.preventDefault(),I())}}),r.jsxs(re,{type:"button",variant:"outline",onClick:I,children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"Add"]})]})]}),r.jsx(or,{}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Supported Input Types"}),r.jsxs("div",{className:"flex flex-col gap-2 md:flex-row",children:[r.jsx(Fe,{value:v,placeholder:"application/json",onChange:W=>C(W.target.value),onKeyDown:W=>{W.key==="Enter"&&(W.preventDefault(),R())}}),r.jsxs(re,{type:"button",variant:"outline",onClick:R,children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"Add"]})]}),r.jsx("div",{className:"flex flex-wrap gap-2",children:t.supportedInputTypes.map(W=>r.jsxs(ut,{variant:"secondary",className:"flex items-center gap-1",children:[W,r.jsx("button",{type:"button",onClick:()=>L(W),className:"ml-1 rounded-full border border-transparent bg-transparent text-muted-foreground transition hover:text-foreground",children:"×"})]},W))})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Supported Output Types"}),r.jsxs("div",{className:"flex flex-col gap-2 md:flex-row",children:[r.jsx(Fe,{value:S,placeholder:"application/json",onChange:W=>b(W.target.value),onKeyDown:W=>{W.key==="Enter"&&(W.preventDefault(),M())}}),r.jsxs(re,{type:"button",variant:"outline",onClick:M,children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"Add"]})]}),r.jsx("div",{className:"flex flex-wrap gap-2",children:t.supportedOutputTypes.map(W=>r.jsxs(ut,{variant:"secondary",className:"flex items-center gap-1",children:[W,r.jsx("button",{type:"button",onClick:()=>$(W),className:"ml-1 rounded-full border border-transparent bg-transparent text-muted-foreground transition hover:text-foreground",children:"×"})]},W))})]})]})]})]})}),r.jsx(Kr,{value:"auth",children:r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Authentication & Security"}),r.jsx(qt,{children:"Document how peer agents should authenticate and connect."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"auth-scheme",children:"Authentication Scheme"}),r.jsx(Fe,{id:"auth-scheme",value:t.authentication.scheme,placeholder:"api_key",onChange:W=>B("scheme",W.target.value)})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"auth-in",children:"Credential Location"}),r.jsx(Fe,{id:"auth-in",value:t.authentication.in,placeholder:"header",onChange:W=>B("in",W.target.value)})]})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"auth-name",children:"Header or Field Name"}),r.jsx(Fe,{id:"auth-name",value:t.authentication.name,placeholder:"X-API-Key",onChange:W=>B("name",W.target.value)})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"auth-example",children:"Example Secret"}),r.jsx(Fe,{id:"auth-example",value:t.authentication.example,placeholder:"nut_***************",onChange:W=>B("example",W.target.value)})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"auth-description",children:"Authentication Notes"}),r.jsx(ar,{id:"auth-description",value:t.authentication.description,placeholder:"Provide API key via X-API-Key header to authenticate requests between agents.",onChange:W=>B("description",W.target.value),rows:3})]}),r.jsx(or,{}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"security-transport",children:"Transport"}),r.jsx(Fe,{id:"security-transport",value:t.security.transport,placeholder:"https",onChange:W=>z("transport",W.target.value)})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"security-encryption",children:"Encryption"}),r.jsx(Fe,{id:"security-encryption",value:t.security.encryption,placeholder:"TLS 1.3",onChange:W=>z("encryption",W.target.value)})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"security-notes",children:"Security Notes"}),r.jsx(Fe,{id:"security-notes",value:t.security.notes,placeholder:"Requests must be encrypted over TLS.",onChange:W=>z("notes",W.target.value)})]})]})]})]})}),r.jsx(Kr,{value:"capabilities",children:r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Capabilities"}),r.jsx(qt,{children:"Describe the skills other agents can invoke."})]}),r.jsxs(Be,{className:"space-y-4",children:[t.capabilities.length===0&&r.jsx("div",{className:"rounded-lg border border-dashed border-border bg-muted/40 p-6 text-center text-sm text-muted-foreground",children:"No capabilities defined yet. Add one to expose functionality for peer agents."}),t.capabilities.map((W,ae)=>r.jsxs(Ie,{className:"border border-border/60",children:[r.jsxs(nt,{className:"flex flex-col gap-2 space-y-0 md:flex-row md:items-center",children:[r.jsxs("div",{className:"flex flex-1 flex-col",children:[r.jsxs(st,{className:"text-lg font-semibold",children:["Capability #",ae+1]}),r.jsx(qt,{children:"Toggle availability and describe request contracts."})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("label",{className:"flex items-center gap-2 text-sm font-medium",children:[r.jsx(ds,{checked:W.enabled,onCheckedChange:se=>X(ae,{enabled:!!se})}),"Expose capability"]}),r.jsxs(re,{size:"icon",variant:"ghost",onClick:()=>Y(ae),title:"Remove capability",children:[r.jsx(Sn,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Remove capability"})]})]})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Capability ID"}),r.jsx(Fe,{value:W.id,placeholder:"create-proposal",onChange:se=>X(ae,{id:se.target.value})})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Skill"}),r.jsx(Fe,{value:W.skill,placeholder:"proposal_management.create",onChange:se=>X(ae,{skill:se.target.value})})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Description"}),r.jsx(ar,{value:W.description,placeholder:"Creates a new proposal record containing intent, plan, and artifacts.",rows:3,onChange:se=>X(ae,{description:se.target.value})})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Endpoint"}),r.jsx(Fe,{value:W.endpoint,placeholder:"https://coconut.dev/api/v1/proposals",onChange:se=>X(ae,{endpoint:se.target.value})})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"HTTP Method"}),r.jsxs(Zt,{value:W.method,onValueChange:se=>X(ae,{method:se}),children:[r.jsx(Wt,{children:r.jsx(Qt,{placeholder:"Select method"})}),r.jsx(Vt,{children:hde.map(se=>r.jsx(Le,{value:se,children:se},se))})]})]})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Input MIME Type"}),r.jsx(Fe,{value:W.inputMimeType??"",placeholder:"application/json",onChange:se=>X(ae,{inputMimeType:se.target.value})}),r.jsx(be,{children:"Input Schema (JSON)"}),r.jsx(ar,{value:W.inputSchema??"",placeholder:'{ "type": "object", "properties": { "title": { "type": "string" } } }',rows:5,onChange:se=>X(ae,{inputSchema:se.target.value})})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Output MIME Type"}),r.jsx(Fe,{value:W.outputMimeType??"",placeholder:"application/json",onChange:se=>X(ae,{outputMimeType:se.target.value})}),r.jsx(be,{children:"Output Schema (JSON)"}),r.jsx(ar,{value:W.outputSchema??"",placeholder:'{ "type": "object", "properties": { "status": { "type": "string" } } }',rows:5,onChange:se=>X(ae,{outputSchema:se.target.value})})]})]})]})]},`${W.id||"capability"}-${ae}`))]}),r.jsx(s6,{children:r.jsxs(re,{type:"button",variant:"outline",onClick:P,children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"Add Capability"]})})]})}),r.jsx(Kr,{value:"contact",children:r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Contact"}),r.jsx(qt,{children:"Provide a human escalation path for peer agents."})]}),r.jsxs(Be,{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"contact-name",children:"Contact Name"}),r.jsx(Fe,{id:"contact-name",value:t.contact.name,placeholder:"Coconut DevOps Team",onChange:W=>Q("name",W.target.value)})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"contact-email",children:"Contact Email"}),r.jsx(Fe,{id:"contact-email",value:t.contact.email,placeholder:"support@coconut.dev",onChange:W=>Q("email",W.target.value)})]})]})]})}),r.jsx(Kr,{value:"preview",children:r.jsxs(Ie,{children:[r.jsx(nt,{children:r.jsxs("div",{className:"flex items-center justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx(st,{children:"Preview"}),r.jsx(qt,{children:"Review the JSON payload served at /.well-known/agent-card.json."})]}),r.jsx(re,{variant:"outline",size:"sm",onClick:te,className:"gap-2",children:_?r.jsxs(r.Fragment,{children:[r.jsx(jd,{className:"h-4 w-4"}),"Copied"]}):r.jsxs(r.Fragment,{children:[r.jsx(Od,{className:"h-4 w-4"}),"Copy"]})})]})}),r.jsx(Be,{children:r.jsx("pre",{className:"max-h-96 overflow-auto rounded-md bg-muted p-4 text-sm",children:JSON.stringify((()=>{try{return F()}catch{return{id:t.id,name:t.name,description:t.description,version:t.version,url:t.url,protocols:t.protocols}}})(),null,2)})})]})})]})]})}const gde=[{title:"Coconut Profile",href:"/settings/user",icon:SH,description:"Manage the Coconut's profile information."},{title:"User Preferences",href:"/settings/preferences",icon:fH,description:"Configure individual workspace preferences"},{title:"Authentication",href:"/settings/authentication",icon:$I,description:"Configure authentication and user access"},{title:"API Keys",href:"/settings/api-keys",icon:sm,description:"Manage API keys for programmatic access"},{title:"Symlinks",href:"/settings/rules",icon:Nr,description:"Manage symlinks for easy access to project rules and configurations"},{title:"AI & LLM",href:"/settings/integrations",icon:ZU,description:"Connect Coconut to LLM providers and automation hooks"},{title:"Git",href:"/settings/git",icon:Ri,description:"Configure repository defaults like worktree paths"},{title:"MCP",href:"/settings/mcp",icon:HI,description:"Model Context Protocol configuration and settings"}];function bde(){const e=Mr();return r.jsxs("div",{className:"flex flex-col space-y-8 lg:flex-row lg:space-x-12 lg:space-y-0",children:[r.jsx("aside",{className:"lg:w-1/5",children:r.jsx("nav",{className:"flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1",children:gde.map(t=>r.jsxs(it,{to:t.href,className:Te("inline-flex items-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground h-9 px-4 py-2 hover:bg-accent justify-start",e.pathname===t.href?"bg-accent text-accent-foreground":"text-muted-foreground"),children:[r.jsx(t.icon,{className:"mr-2 h-4 w-4"}),r.jsx("span",{className:"hidden lg:inline",children:t.title})]},t.href))})}),r.jsx("div",{className:"flex-1 lg:max-w-2xl",children:r.jsx("div",{className:"space-y-6",children:r.jsx(HD,{})})})]})}const N0=[{id:"software-engineer",title:"Software Engineer",description:"Builds, refactors, and reviews high-quality code across stacks. Excellent at translating specs into implementation and optimizing system performance. Strong at debugging, architecture patterns, and accelerating development velocity."},{id:"product-strategist",title:"Product Strategist",description:"Defines product direction, clarifies requirements, and aligns work with user and business goals. Skilled in roadmap planning, prioritization, and transforming ambiguous ideas into actionable plans."},{id:"researcher",title:"Researcher",description:"Investigates topics deeply, synthesizes information, and produces evidence-based insights. Strong at literature review, competitive analysis, and generating clear summaries to inform decisions."},{id:"designer",title:"Designer",description:"Creates intuitive interfaces, user flows, and visual assets. Focused on usability, accessibility, and crafting polished experiences. Strong at wireframing and turning requirements into elegant solutions."},{id:"qa-engineer",title:"QA Engineer",description:"Identifies bugs, edge cases, and reliability gaps. Produces test plans, automated tests, and reproducible reports. Strong at ensuring product quality and preventing regressions."},{id:"devops-engineer",title:"DevOps Engineer",description:"Manages infrastructure, deployments, and operational reliability. Skilled with CI/CD, observability, automation, and environment provisioning. Ensures systems are scalable and fault-tolerant."},{id:"data-analyst",title:"Data Analyst",description:"Analyzes data, defines metrics, and generates actionable insights. Strong in SQL, visualization, experimentation, and turning raw data into strategic recommendations."},{id:"marketer",title:"Marketer",description:"Creates campaigns, messaging, and positioning to reach target audiences. Skilled in content, funnels, and brand strategy. Strong at synthesizing market needs and shaping demand."},{id:"sales-partnerships-agent",title:"Sales & Partnerships Agent",description:"Identifies prospects, crafts outreach, and develops strategic relationships. Strong at value articulation, objection handling, and mapping product capabilities to customer needs."},{id:"growth-operator",title:"Growth Operator",description:"Optimizes acquisition, activation, and retention through experimentation. Skilled in funnel analysis, rapid testing, and leveraging data for compounding growth."},{id:"customer-success-specialist",title:"Customer Success Specialist",description:"Ensures users succeed by providing onboarding, guidance, and proactive support. Strong at diagnosing user challenges and improving long-term satisfaction and retention."},{id:"orchestration-engineer",title:"Orchestration Engineer",description:"Coordinates multi-agent workflows, dependencies, and handoffs. Strong at breaking large tasks into sequenced steps and ensuring agents operate cohesively and efficiently."},{id:"context-curator",title:"Context Curator",description:"Maintains clean, accurate project context by organizing files, logs, and knowledge. Strong at eliminating ambiguity, ensuring agents have the right information at the right time."},{id:"documentation-writer",title:"Documentation Writer",description:"Produces clear technical docs, guides, READMEs, and CP summaries. Strong at structuring complex information and keeping knowledge bases up to date and accessible."}];function ND(){const[e,t]=w.useState({}),[n,s]=w.useState(null),[a,o]=w.useState(!1),[u,c]=w.useState(!0),[d,h]=w.useState(!1),{toast:p}=bn();w.useEffect(()=>{m()},[]);const m=async()=>{try{try{const b=await fetch(`${Ae}/api/v1/config`),y=await b.json();if(b.ok&&y?.success){const E=y.data?.coconut||{};s(E.id??null),(E.firstName||E.lastName||E.email||E.role||E.roleDescription)&&t({firstName:E.firstName,lastName:E.lastName,email:E.email,role:E.role,roleDescription:E.roleDescription})}else s(null)}catch(b){console.error("Failed to load coconut config:",b),s(null)}}catch(b){console.error("Failed to load settings:",b),p({title:"Error",description:"Failed to load user settings",variant:"destructive"})}finally{c(!1)}},g=async()=>{h(!0);try{const y=await(await fetch(`${Ae}/api/v1/config`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({coconut:{...e,id:n||void 0}})})).json();if(y.success)p({title:"Success",description:"Settings saved successfully"});else throw new Error(y.error||"Failed to save settings")}catch(b){console.error("Failed to save settings:",b),p({title:"Error",description:"Failed to save settings",variant:"destructive"})}finally{h(!1)}},v=b=>{t(y=>{const E={...y,...b};if(b.role!==void 0){const _=N0.find(N=>N.id===b.role);_?.description&&(E.roleDescription=_.description)}return E})},C=w.useMemo(()=>e.role&&N0.find(y=>y.id===e.role)?.description||null,[e.role]),S=async()=>{if(n)try{await navigator.clipboard.writeText(n),o(!0),p({title:"Copied",description:"Coconut ID copied to clipboard."}),setTimeout(()=>o(!1),1500)}catch(b){console.error("Failed to copy coconut ID:",b),p({title:"Copy failed",description:"Unable to copy the Coconut ID to the clipboard.",variant:"destructive"})}};return u?r.jsx("div",{children:"Loading..."}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"Coconut Settings"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage the Coconut's profile information."})]}),r.jsx(or,{}),r.jsx("div",{className:"rounded-lg border border-dashed bg-muted/40 p-4",children:n?r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsxs("div",{className:"flex flex-col",children:[r.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Coconut ID"}),r.jsx("p",{className:"mt-1 font-mono text-sm",children:n})]}),r.jsxs(re,{variant:"outline",size:"sm",onClick:S,children:[a?r.jsx(jd,{className:"h-4 w-4"}):r.jsx(Od,{className:"h-4 w-4"}),r.jsx("span",{className:"ml-2",children:a?"Copied":"Copy"})]})]}):r.jsxs("div",{className:"space-y-1",children:[r.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Coconut ID not configured"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Add an `id` under the `coconut` section in `.nut/config.json` to register this Coconut instance."})]})}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Coconut Profile"}),r.jsx(qt,{children:"Update the Coconut's identifying details and role."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"firstName",children:"First Name"}),r.jsx(Fe,{id:"firstName",value:e.firstName||"",onChange:b=>v({firstName:b.target.value}),placeholder:"Enter first name"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"lastName",children:"Last Name"}),r.jsx(Fe,{id:"lastName",value:e.lastName||"",onChange:b=>v({lastName:b.target.value}),placeholder:"Enter last name"})]})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"email",children:"Email"}),r.jsx(Fe,{id:"email",type:"email",value:e.email||"",onChange:b=>v({email:b.target.value}),placeholder:"Enter email address"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"role",children:"Role"}),r.jsxs(Zt,{value:e.role,onValueChange:b=>v({role:b}),children:[r.jsx(Wt,{children:r.jsx(Qt,{placeholder:"Select your role"})}),r.jsx(Vt,{children:N0.map(b=>r.jsx(Le,{value:b.id,children:b.title},b.id))})]}),C&&r.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:C})]})]})]}),r.jsxs("p",{className:"text-sm text-muted-foreground",children:["You can also manage the Coconut's identity to other agents on the"," ",r.jsx(it,{to:"/identity",className:"underline underline-offset-4 hover:text-primary",children:"Identity page"}),"."]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx(re,{variant:"outline",onClick:m,disabled:d,children:"Cancel"}),r.jsx(re,{onClick:g,disabled:d,children:d?"Saving...":"Save Changes"})]})]})}function xde(){const{user:e,authEnabled:t,checkAuthStatus:n}=uc(),[s,a]=w.useState(null),[o,u]=w.useState(!0),[c,d]=w.useState(!1),[h,p]=w.useState(!1),[m,g]=w.useState(""),[v,C]=w.useState(""),[S,b]=w.useState("viewer"),[y,E]=w.useState(null),[_,N]=w.useState(""),A=!t||e?.role==="admin";w.useEffect(()=>{k()},[]);const k=async()=>{try{u(!0);const z=await Tn("/api/v1/auth-settings");z.success?a(z.data):a(null)}catch(z){console.error("Failed to load auth settings:",z),a(null)}finally{u(!1)}},I=async()=>{if(!s)return;const z=!s.enabled;try{const Q=await Tn("/api/v1/auth-settings",{method:"PUT",body:JSON.stringify({enabled:z})});if(Q.success)a({...s,enabled:z}),await n(),Et({title:"Success",description:`Authentication ${z?"enabled":"disabled"}`});else throw new Error(Q.error||"Failed to toggle auth")}catch(Q){Et({title:"Error",description:Q.message||"Failed to toggle authentication",variant:"destructive"})}},R=async()=>{if(!s)return;const z=!s.allowRegistration;try{const Q=await Tn("/api/v1/auth-settings",{method:"PUT",body:JSON.stringify({allowRegistration:z})});if(Q.success)a({...s,allowRegistration:z}),Et({title:"Success",description:`Self-registration ${z?"enabled":"disabled"}`});else throw new Error(Q.error||"Failed to update setting")}catch(Q){Et({title:"Error",description:Q.message||"Failed to update setting",variant:"destructive"})}},M=async()=>{if(!m||!v){Et({title:"Error",description:"Please provide email and name",variant:"destructive"});return}try{const z=await Tn("/api/v1/auth-settings/users",{method:"POST",body:JSON.stringify({email:m,name:v,role:S})});if(z.success)await k(),p(!1),g(""),C(""),b("viewer"),Et({title:"Success",description:"User added to whitelist"});else throw new Error(z.error||"Failed to add user")}catch(z){Et({title:"Error",description:z.message||"Failed to add user",variant:"destructive"})}},L=async z=>{try{const Q=await Tn(`/api/v1/auth-settings/users/${z}`,{method:"DELETE"});if(Q.success)await k(),Et({title:"Success",description:"User removed from whitelist"});else throw new Error(Q.error||"Failed to remove user")}catch(Q){Et({title:"Error",description:Q.message||"Failed to remove user",variant:"destructive"})}},$=async(z,Q)=>{try{const P=await Tn(`/api/v1/auth-settings/users/${z}`,{method:"PUT",body:JSON.stringify({role:Q})});if(P.success)await k(),Et({title:"Success",description:"User role updated"});else throw new Error(P.error||"Failed to update role")}catch(P){Et({title:"Error",description:P.message||"Failed to update role",variant:"destructive"})}},H=async()=>{if(!(!y||!_)){if(_.length<8){Et({title:"Error",description:"Password must be at least 8 characters",variant:"destructive"});return}try{const z=await Tn(`/api/v1/auth-settings/users/${y}/reset-password`,{method:"POST",body:JSON.stringify({newPassword:_})});if(z.success)E(null),N(""),Et({title:"Success",description:"Password reset successfully"});else throw new Error(z.error||"Failed to reset password")}catch(z){Et({title:"Error",description:z.message||"Failed to reset password",variant:"destructive"})}}},B=async()=>{if(s)try{d(!0);const z=await Tn("/api/v1/auth-settings",{method:"PUT",body:JSON.stringify({session:s.session})});if(z.success)Et({title:"Success",description:"Session settings updated"});else throw new Error(z.error||"Failed to update settings")}catch(z){Et({title:"Error",description:z.message||"Failed to update settings",variant:"destructive"})}finally{d(!1)}};return o?r.jsx("div",{children:"Loading..."}):s?A?r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"Authentication"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage authentication settings and user access."})]}),r.jsx(or,{}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx($I,{className:"h-5 w-5"}),r.jsx(st,{children:"Authentication Status"})]}),r.jsx(qt,{children:"Control whether authentication is required to access Coconut."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"auth-enabled",children:"Require Authentication"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"When enabled, users must log in to access Coconut"})]}),r.jsx(Fa,{id:"auth-enabled",checked:s.enabled,onCheckedChange:I})]}),s.enabled&&r.jsxs("div",{className:"flex items-center justify-between pt-2 border-t",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"allow-registration",children:"Allow Self-Registration"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Whitelisted users can create their own accounts"})]}),r.jsx(Fa,{id:"allow-registration",checked:s.allowRegistration,onCheckedChange:R})]})]})]}),r.jsxs(Ie,{children:[r.jsx(nt,{children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx(st,{children:"Whitelisted Users"}),r.jsx(qt,{children:"Manage users who can access this Coconut instance."})]}),r.jsxs(fn,{open:h,onOpenChange:p,children:[r.jsx(Cp,{asChild:!0,children:r.jsxs(re,{size:"sm",children:[r.jsx(TH,{className:"h-4 w-4 mr-2"}),"Add User"]})}),r.jsxs(ln,{children:[r.jsxs(nn,{children:[r.jsx(rn,{children:"Add User to Whitelist"}),r.jsx(_n,{children:"Add a user's email to allow them to register and access Coconut."})]}),r.jsxs("div",{className:"space-y-4 py-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"new-email",children:"Email"}),r.jsx(Fe,{id:"new-email",type:"email",value:m,onChange:z=>g(z.target.value),placeholder:"user@example.com"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"new-name",children:"Name"}),r.jsx(Fe,{id:"new-name",value:v,onChange:z=>C(z.target.value),placeholder:"User Name"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"new-role",children:"Role"}),r.jsxs(Zt,{value:S,onValueChange:z=>b(z),children:[r.jsx(Wt,{children:r.jsx(Qt,{})}),r.jsxs(Vt,{children:[r.jsx(Le,{value:"viewer",children:"Viewer"}),r.jsx(Le,{value:"engineer",children:"Engineer"}),r.jsx(Le,{value:"designer",children:"Designer"}),r.jsx(Le,{value:"product_manager",children:"Product Manager"}),r.jsx(Le,{value:"manager",children:"Manager"}),r.jsx(Le,{value:"admin",children:"Admin"})]})]})]})]}),r.jsxs(lr,{children:[r.jsx(re,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),r.jsx(re,{onClick:M,children:"Add User"})]})]})]})]})}),r.jsx(Be,{children:r.jsx("div",{className:"space-y-4",children:s.providers.local.users.map(z=>r.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[r.jsxs("div",{className:"space-y-1 flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("p",{className:"font-medium",children:z.name}),z.registered?r.jsx(ut,{variant:"default",className:"text-xs",children:"Registered"}):r.jsx(ut,{variant:"secondary",className:"text-xs",children:"Pending"}),z.id===e?.id&&r.jsx(ut,{variant:"outline",className:"text-xs",children:"You"})]}),r.jsx("p",{className:"text-sm text-muted-foreground",children:z.email}),z.lastLoginAt&&r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Last login: ",new Date(z.lastLoginAt).toLocaleString()]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs(Zt,{value:z.role,onValueChange:Q=>$(z.id,Q),children:[r.jsx(Wt,{className:"w-40",children:r.jsx(Qt,{})}),r.jsxs(Vt,{children:[r.jsx(Le,{value:"viewer",children:"Viewer"}),r.jsx(Le,{value:"engineer",children:"Engineer"}),r.jsx(Le,{value:"designer",children:"Designer"}),r.jsx(Le,{value:"product_manager",children:"Product Manager"}),r.jsx(Le,{value:"manager",children:"Manager"}),r.jsx(Le,{value:"admin",children:"Admin"})]})]}),r.jsxs(fn,{open:y===z.id,onOpenChange:Q=>{Q||(E(null),N(""))},children:[r.jsx(Cp,{asChild:!0,children:r.jsx(re,{size:"sm",variant:"outline",onClick:()=>E(z.id),children:r.jsx(NU,{className:"h-4 w-4"})})}),r.jsxs(ln,{children:[r.jsxs(nn,{children:[r.jsx(rn,{children:"Reset Password"}),r.jsxs(_n,{children:["Set a new password for ",z.name]})]}),r.jsx("div",{className:"space-y-4 py-4",children:r.jsxs("div",{children:[r.jsx(be,{htmlFor:"reset-password",children:"New Password"}),r.jsx(Fe,{id:"reset-password",type:"password",value:_,onChange:Q=>N(Q.target.value),placeholder:"At least 8 characters",minLength:8})]})}),r.jsxs(lr,{children:[r.jsx(re,{variant:"outline",onClick:()=>{E(null),N("")},children:"Cancel"}),r.jsx(re,{onClick:H,children:"Reset Password"})]})]})]}),z.id!==e?.id&&r.jsxs(Oi,{children:[r.jsx(tc,{asChild:!0,children:r.jsx(re,{size:"sm",variant:"destructive",children:r.jsx(Sn,{className:"h-4 w-4"})})}),r.jsxs(Pa,{children:[r.jsxs(Ba,{children:[r.jsx(Ha,{children:"Remove User"}),r.jsxs($a,{children:["Are you sure you want to remove ",z.name," from the whitelist? They will no longer be able to access Coconut."]})]}),r.jsxs(Ua,{children:[r.jsx(Ga,{children:"Cancel"}),r.jsx(za,{onClick:()=>L(z.id),children:"Remove"})]})]})]})]})]},z.id))})})]}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Session Settings"}),r.jsx(qt,{children:"Configure session behavior and security."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"session-expiry",children:"Session Expiry"}),r.jsx(Fe,{id:"session-expiry",value:s.session.expiresIn,onChange:z=>a({...s,session:{...s.session,expiresIn:z.target.value}}),placeholder:"7d"}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Format: 30s, 15m, 24h, 7d"})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"secure-cookies",children:"Secure Cookies (HTTPS only)"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Enable in production with HTTPS"})]}),r.jsx(Fa,{id:"secure-cookies",checked:s.session.secure||!1,onCheckedChange:z=>a({...s,session:{...s.session,secure:z}})})]})]})]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx(re,{variant:"outline",onClick:k,disabled:c,children:"Cancel"}),r.jsx(re,{onClick:B,disabled:c,children:c?"Saving...":"Save Session Settings"})]})]}):r.jsx("div",{className:"space-y-6",children:r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"Authentication"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"You don't have permission to manage authentication settings."})]})}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"Authentication"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Secure your Coconut instance with authentication."})]}),r.jsx(or,{}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Ii,{className:"h-5 w-5 text-muted-foreground"}),r.jsx(st,{children:"Authentication Not Configured"})]}),r.jsx(qt,{children:"Authentication has not been initialized. Use the CLI to set up authentication."})]}),r.jsxs(Be,{children:[r.jsx("div",{className:"bg-muted p-4 rounded-md",children:r.jsxs("code",{className:"text-sm",children:["$ nut auth init",r.jsx("br",{}),"$ nut auth toggle"]})}),r.jsx("p",{className:"text-sm text-muted-foreground mt-4",children:"This will create an admin user and enable authentication for your Coconut instance."})]})]})]})}function vde(){const{authEnabled:e}=uc(),[t,n]=w.useState([]),[s,a]=w.useState(!0),[o,u]=w.useState(!1),[c,d]=w.useState(!1),[h,p]=w.useState(""),[m,g]=w.useState("never"),[v,C]=w.useState(null),[S,b]=w.useState(null);w.useEffect(()=>{y()},[]);const y=async()=>{a(!0);try{const L=await Tn("/api/v1/api-keys");L.success&&n(L.data?.apiKeys||[])}catch(L){console.error("Failed to load API keys:",L),n([])}finally{a(!1)}},E=async()=>{if(!h.trim()){Et({title:"Error",description:"Please provide a name for the API key",variant:"destructive"});return}try{const L={name:h,scopes:["*"]};m!=="never"&&(L.expiresIn=m);const $=await Tn("/api/v1/api-keys",{method:"POST",body:JSON.stringify(L)});$.success&&(C($.data),u(!1),d(!0),p(""),g("never"),await y(),Et({title:"API Key Created",description:"Make sure to copy your API key now. You won't be able to see it again!"}))}catch(L){console.error("Failed to create API key:",L),Et({title:"Error",description:"Failed to create API key",variant:"destructive"})}},_=async L=>{try{(await Tn(`/api/v1/api-keys/${L}`,{method:"DELETE"})).success&&(await y(),b(null),Et({title:"API Key Deleted",description:"The API key has been permanently deleted"}))}catch($){console.error("Failed to delete API key:",$),Et({title:"Error",description:"Failed to delete API key",variant:"destructive"})}},N=async L=>{try{await navigator.clipboard.writeText(L),Et({title:"Copied",description:"API key copied to clipboard"})}catch{Et({title:"Error",description:"Failed to copy to clipboard",variant:"destructive"})}},A=L=>new Date(L).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),k=L=>L?new Date(L)<new Date:!1,I=typeof window<"u"?window.location.origin:"http://localhost:3000",R=v?`curl -H "X-API-Key: ${v.key}" \\
|
|
965
|
+
\`\`\``,height:800})})]})]})}const xo=w.forwardRef(({className:e,variant:t="default",...n},s)=>{const a="relative w-full rounded-lg border px-4 py-3 text-sm [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",o=t==="destructive"?"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive":"bg-background text-foreground";return r.jsx("div",{ref:s,role:"alert",className:Te(a,o,e),...n})});xo.displayName="Alert";const vo=w.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:Te("text-sm [&_p]:leading-relaxed",e),...t}));vo.displayName="AlertDescription";const dde=["a2a_v0.2","a2a_v0.1","jsonrpc2","jsonrpc","openrpc","rest"],hde=["GET","POST","PUT","PATCH","DELETE"],fde=()=>({id:"",skill:"",description:"",endpoint:"",method:"POST",enabled:!0,inputMimeType:"application/json",outputMimeType:"application/json",inputSchema:"",outputSchema:""}),Pl={id:"",name:"",description:"",version:"1.0.0",url:"",documentation:"",protocols:["a2a_v0.2"],authentication:{scheme:"api_key",in:"header",name:"X-API-Key",example:"",description:""},capabilities:[],supportedInputTypes:["application/json"],supportedOutputTypes:["application/json"],security:{transport:"https",encryption:"TLS 1.3",notes:""},contact:{name:"",email:""},lastUpdated:void 0},fo=e=>({...e,protocols:[...e.protocols],authentication:{...e.authentication},capabilities:e.capabilities.map(t=>({...t})),supportedInputTypes:[...e.supportedInputTypes],supportedOutputTypes:[...e.supportedOutputTypes],security:{...e.security},contact:{...e.contact}}),Vu=()=>fo(Pl);function pde(e){if(!e)return Vu();const t=Array.isArray(e.protocols)?e.protocols.filter(u=>typeof u=="string"):[],n=Array.isArray(e.supportedContentTypes?.input)?e.supportedContentTypes.input.filter(u=>typeof u=="string"):[],s=Array.isArray(e.supportedContentTypes?.output)?e.supportedContentTypes.output.filter(u=>typeof u=="string"):[],a=Array.isArray(e.capabilities)?e.capabilities.map(u=>({id:typeof u.id=="string"?u.id:"",skill:typeof u.skill=="string"?u.skill:"",description:typeof u.description=="string"?u.description:"",endpoint:typeof u.endpoint=="string"?u.endpoint:"",method:typeof u.method=="string"?u.method:"POST",enabled:u?.enabled!==!1,inputMimeType:typeof u.input?.mimeType=="string"?u.input.mimeType:"application/json",outputMimeType:typeof u.output?.mimeType=="string"?u.output.mimeType:"application/json",inputSchema:u.input?.schema?JSON.stringify(u.input.schema,null,2):"",outputSchema:u.output?.schema?JSON.stringify(u.output.schema,null,2):""})):[],o={scheme:typeof e.authentication?.scheme=="string"?e.authentication.scheme:"api_key",in:typeof e.authentication?.in=="string"?e.authentication.in:"header",name:typeof e.authentication?.name=="string"?e.authentication.name:"X-API-Key",example:typeof e.authentication?.example=="string"?e.authentication.example:"",description:typeof e.authentication?.description=="string"?e.authentication.description:""};return{id:typeof e.id=="string"?e.id:"",name:typeof e.name=="string"?e.name:"",description:typeof e.description=="string"?e.description:"",version:typeof e.version=="string"?e.version:"1.0.0",url:typeof e.url=="string"?e.url:"",documentation:typeof e.documentation=="string"?e.documentation:"",protocols:t.length>0?t:Pl.protocols,authentication:o,capabilities:a,supportedInputTypes:n.length>0?n:Pl.supportedInputTypes,supportedOutputTypes:s.length>0?s:Pl.supportedOutputTypes,security:{transport:typeof e.security?.transport=="string"?e.security.transport:Pl.security.transport,encryption:typeof e.security?.encryption=="string"?e.security.encryption:Pl.security.encryption,notes:typeof e.security?.notes=="string"?e.security.notes:""},contact:{name:typeof e.contact?.name=="string"?e.contact.name:"",email:typeof e.contact?.email=="string"?e.contact.email:""},lastUpdated:typeof e.lastUpdated=="string"?e.lastUpdated:void 0}}function mde(){const{toast:e}=bn(),[t,n]=w.useState(()=>Vu()),[s,a]=w.useState(()=>Vu()),[o,u]=w.useState(!0),[c,d]=w.useState(!1),[h,p]=w.useState(null),[m,g]=w.useState(""),[v,C]=w.useState(""),[S,b]=w.useState(""),[y,E]=w.useState(void 0),[_,N]=w.useState(!1),A=w.useMemo(()=>{const W=new Set([...dde,...t.protocols]);return Array.from(W).sort()},[t.protocols]);w.useEffect(()=>{let W=!0;return(async()=>{u(!0),p(null);try{const se=await fetch(`${Ae}/api/v1/identity/agent-card`);if(!se.ok)throw new Error(`Failed to load agent card (${se.status})`);const K=await se.json();if(K.success&&K.data){const G=pde(K.data.card||void 0);if(G.id||(G.id="urn:agent:coconut"),G.url||(G.url=`${window.location.origin}/api/v1`),G.lastUpdated=K.data.updatedAt??G.lastUpdated,W){const Z=fo(G);n(Z),a(fo(Z)),E(K.data.updatedAt??Z.lastUpdated)}}else{if(K.error)throw new Error(K.error);if(W){const G=Vu();n(G),a(fo(G))}}}catch(se){if(console.error("Failed to fetch agent card",se),W){p(se instanceof Error?se.message:"Failed to load agent identity");const K=Vu();n(K),a(fo(K))}}finally{W&&u(!1)}})(),()=>{W=!1}},[]);const k=(W,ae)=>{n(se=>{const K=ae?[...new Set([...se.protocols,W])]:se.protocols.filter(G=>G!==W);return{...se,protocols:K}})},I=()=>{const W=m.trim();W&&(n(ae=>({...ae,protocols:[...new Set([...ae.protocols,W])]})),g(""))},R=()=>{const W=v.trim();W&&(n(ae=>({...ae,supportedInputTypes:[...new Set([...ae.supportedInputTypes,W])]})),C(""))},M=()=>{const W=S.trim();W&&(n(ae=>({...ae,supportedOutputTypes:[...new Set([...ae.supportedOutputTypes,W])]})),b(""))},L=W=>{n(ae=>({...ae,supportedInputTypes:ae.supportedInputTypes.filter(se=>se!==W)}))},$=W=>{n(ae=>({...ae,supportedOutputTypes:ae.supportedOutputTypes.filter(se=>se!==W)}))},H=(W,ae)=>{n(se=>({...se,[W]:ae}))},B=(W,ae)=>{n(se=>({...se,authentication:{...se.authentication,[W]:ae}}))},z=(W,ae)=>{n(se=>({...se,security:{...se.security,[W]:ae}}))},Q=(W,ae)=>{n(se=>({...se,contact:{...se.contact,[W]:ae}}))},P=()=>{n(W=>({...W,capabilities:[...W.capabilities,fde()]}))},X=(W,ae)=>{n(se=>{const K=[...se.capabilities];return K[W]={...K[W],...ae},{...se,capabilities:K}})},Y=W=>{n(ae=>({...ae,capabilities:ae.capabilities.filter((se,K)=>K!==W)}))},F=()=>{const W=[["id","Agent ID"],["name","Name"],["description","Description"],["version","Version"],["url","Service URL"]];for(const[se,K]of W){const G=t[se];if(typeof G!="string"||!G.trim())throw new Error(`${K} is required`)}const ae=t.capabilities.map((se,K)=>({cap:se,index:K})).filter(({cap:se})=>se.enabled&&se.id.trim()&&se.endpoint.trim()).map(({cap:se,index:K})=>{const G=se.id.trim()||`Capability ${K+1}`,Z={id:se.id.trim(),skill:se.skill.trim(),description:se.description.trim(),endpoint:se.endpoint.trim(),method:se.method||"POST"},ce=(le,ne)=>{if(!(!le||!le.trim()))try{return JSON.parse(le)}catch(pe){throw new Error(`${G} ${ne} schema must be valid JSON. ${pe?.message??pe}`)}};return(se.inputMimeType?.trim()||se.inputSchema?.trim())&&(Z.input={mimeType:se.inputMimeType?.trim()||"application/json",schema:ce(se.inputSchema,"input")}),(se.outputMimeType?.trim()||se.outputSchema?.trim())&&(Z.output={mimeType:se.outputMimeType?.trim()||"application/json",schema:ce(se.outputSchema,"output")}),Z});return{id:t.id.trim(),name:t.name.trim(),description:t.description.trim(),version:t.version.trim(),url:t.url.trim(),documentation:t.documentation.trim()||void 0,protocols:t.protocols,authentication:{scheme:t.authentication.scheme.trim()||"api_key",in:t.authentication.in.trim()||"header",name:t.authentication.name.trim()||"X-API-Key",example:t.authentication.example.trim()||void 0,description:t.authentication.description.trim()||void 0},capabilities:ae,supportedContentTypes:{input:t.supportedInputTypes,output:t.supportedOutputTypes},security:{transport:t.security.transport.trim()||"https",encryption:t.security.encryption.trim()||"TLS 1.3",notes:t.security.notes.trim()||void 0},contact:{name:t.contact.name.trim()||void 0,email:t.contact.email.trim()||void 0},lastUpdated:new Date().toISOString()}},O=async()=>{d(!0),p(null);try{const W=F(),ae=await fetch(`${Ae}/api/v1/identity/agent-card`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({card:W})}),se=await ae.json();if(!ae.ok||!se?.success)throw new Error(se?.error||"Failed to save agent card");e({title:"Agent card saved",description:"The identity card has been updated successfully."});const K=se?.data?.updatedAt??new Date().toISOString();n(G=>{const Z={...G,lastUpdated:K};return a(fo(Z)),Z}),E(K)}catch(W){console.error("Failed to save agent card",W),p(W instanceof Error?W.message:"Failed to save agent card"),e({title:"Save failed",description:W instanceof Error?W.message:"Failed to save agent card, see console for details.",variant:"destructive"})}finally{d(!1)}},V=()=>{n(fo(s)),p(null),g(""),C(""),b(""),E(s.lastUpdated??y)},te=async()=>{try{const W=JSON.stringify(F(),null,2);await navigator.clipboard.writeText(W),N(!0),setTimeout(()=>N(!1),1500),e({title:"Copied!",description:"Agent card JSON copied to clipboard."})}catch(W){console.error("Failed to copy agent card preview:",W),e({title:"Copy failed",description:"Unable to copy agent card JSON to clipboard.",variant:"destructive"})}},U=w.useMemo(()=>{if(!y)return null;try{return new Date(y).toLocaleString()}catch{return null}},[y]);return o?r.jsx("div",{className:"flex h-full items-center justify-center",children:r.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[r.jsx(tn,{className:"h-5 w-5 animate-spin"}),r.jsx("span",{children:"Loading identity card..."})]})}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col justify-between gap-4 md:flex-row md:items-end",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-3xl font-bold",children:"Agent Identity"}),r.jsxs("p",{className:"text-muted-foreground",children:["Manage the"," ",r.jsx("a",{href:"/.well-known/agent-card.json",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-4 hover:text-primary",children:"/.well-known/agent-card.json"})," ","descriptor for A2A discovery."]}),U&&r.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Last updated ",U]})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[r.jsxs(re,{variant:"outline",onClick:V,disabled:c,children:[r.jsx(tH,{className:"mr-2 h-4 w-4"}),"Reset"]}),r.jsx(re,{onClick:O,disabled:c,children:c?r.jsxs(r.Fragment,{children:[r.jsx(tn,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):r.jsxs(r.Fragment,{children:[r.jsx(Vr,{className:"mr-2 h-4 w-4"}),"Save Changes"]})})]})]}),h&&r.jsxs(xo,{variant:"destructive",children:[r.jsx("div",{className:"font-semibold",children:"Something went wrong"}),r.jsx(vo,{children:h})]}),r.jsxs(Fm,{defaultValue:"overview",className:"space-y-6",children:[r.jsxs(Xd,{children:[r.jsx(Yr,{value:"overview",children:"Identity Overview"}),r.jsx(Yr,{value:"protocols",children:"Protocols & Content"}),r.jsx(Yr,{value:"auth",children:"Authentication & Security"}),r.jsx(Yr,{value:"capabilities",children:"Capabilities"}),r.jsx(Yr,{value:"contact",children:"Contact"}),r.jsx(Yr,{value:"preview",children:"Preview"})]}),r.jsx(Kr,{value:"overview",children:r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Identity Overview"}),r.jsx(qt,{children:"Define core attributes used for discovery."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"agent-id",children:"Agent Identifier"}),r.jsx(Fe,{id:"agent-id",value:t.id,placeholder:"urn:agent:coconut-dev",onChange:W=>H("id",W.target.value)})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"agent-name",children:"Name"}),r.jsx(Fe,{id:"agent-name",value:t.name,placeholder:"Coconut Development Agent",onChange:W=>H("name",W.target.value)})]})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"agent-version",children:"Version"}),r.jsx(Fe,{id:"agent-version",value:t.version,placeholder:"1.0.0",onChange:W=>H("version",W.target.value)})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"agent-url",children:"Primary Endpoint"}),r.jsx(Fe,{id:"agent-url",value:t.url,placeholder:"https://coconut.dev/api/v1",onChange:W=>H("url",W.target.value)})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"agent-description",children:"Description"}),r.jsx(ar,{id:"agent-description",value:t.description,placeholder:"Agent responsible for managing proposals, plans, and operations...",onChange:W=>H("description",W.target.value),rows:4})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"agent-docs",children:"Documentation URL"}),r.jsx(Fe,{id:"agent-docs",value:t.documentation,placeholder:"https://docs.coconut.dev/a2a",onChange:W=>H("documentation",W.target.value)})]})]})]})}),r.jsx(Kr,{value:"protocols",children:r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Protocols & Content Types"}),r.jsx(qt,{children:"Select supported discovery protocols and payload formats."})]}),r.jsxs(Be,{className:"space-y-6",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Protocols"}),r.jsx("div",{className:"grid gap-2 md:grid-cols-3",children:A.map(W=>r.jsxs("label",{className:"flex items-center gap-2 rounded-md border border-border bg-muted/20 px-3 py-2",children:[r.jsx(ds,{checked:t.protocols.includes(W),onCheckedChange:ae=>k(W,!!ae)}),r.jsx("span",{className:"text-sm font-medium",children:W})]},W))}),r.jsxs("div",{className:"flex flex-col gap-2 md:flex-row",children:[r.jsx(Fe,{value:m,placeholder:"Add custom protocol (press Add)",onChange:W=>g(W.target.value),onKeyDown:W=>{W.key==="Enter"&&(W.preventDefault(),I())}}),r.jsxs(re,{type:"button",variant:"outline",onClick:I,children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"Add"]})]})]}),r.jsx(or,{}),r.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Supported Input Types"}),r.jsxs("div",{className:"flex flex-col gap-2 md:flex-row",children:[r.jsx(Fe,{value:v,placeholder:"application/json",onChange:W=>C(W.target.value),onKeyDown:W=>{W.key==="Enter"&&(W.preventDefault(),R())}}),r.jsxs(re,{type:"button",variant:"outline",onClick:R,children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"Add"]})]}),r.jsx("div",{className:"flex flex-wrap gap-2",children:t.supportedInputTypes.map(W=>r.jsxs(ut,{variant:"secondary",className:"flex items-center gap-1",children:[W,r.jsx("button",{type:"button",onClick:()=>L(W),className:"ml-1 rounded-full border border-transparent bg-transparent text-muted-foreground transition hover:text-foreground",children:"×"})]},W))})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Supported Output Types"}),r.jsxs("div",{className:"flex flex-col gap-2 md:flex-row",children:[r.jsx(Fe,{value:S,placeholder:"application/json",onChange:W=>b(W.target.value),onKeyDown:W=>{W.key==="Enter"&&(W.preventDefault(),M())}}),r.jsxs(re,{type:"button",variant:"outline",onClick:M,children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"Add"]})]}),r.jsx("div",{className:"flex flex-wrap gap-2",children:t.supportedOutputTypes.map(W=>r.jsxs(ut,{variant:"secondary",className:"flex items-center gap-1",children:[W,r.jsx("button",{type:"button",onClick:()=>$(W),className:"ml-1 rounded-full border border-transparent bg-transparent text-muted-foreground transition hover:text-foreground",children:"×"})]},W))})]})]})]})]})}),r.jsx(Kr,{value:"auth",children:r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Authentication & Security"}),r.jsx(qt,{children:"Document how peer agents should authenticate and connect."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"auth-scheme",children:"Authentication Scheme"}),r.jsx(Fe,{id:"auth-scheme",value:t.authentication.scheme,placeholder:"api_key",onChange:W=>B("scheme",W.target.value)})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"auth-in",children:"Credential Location"}),r.jsx(Fe,{id:"auth-in",value:t.authentication.in,placeholder:"header",onChange:W=>B("in",W.target.value)})]})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"auth-name",children:"Header or Field Name"}),r.jsx(Fe,{id:"auth-name",value:t.authentication.name,placeholder:"X-API-Key",onChange:W=>B("name",W.target.value)})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"auth-example",children:"Example Secret"}),r.jsx(Fe,{id:"auth-example",value:t.authentication.example,placeholder:"nut_***************",onChange:W=>B("example",W.target.value)})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"auth-description",children:"Authentication Notes"}),r.jsx(ar,{id:"auth-description",value:t.authentication.description,placeholder:"Provide API key via X-API-Key header to authenticate requests between agents.",onChange:W=>B("description",W.target.value),rows:3})]}),r.jsx(or,{}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"security-transport",children:"Transport"}),r.jsx(Fe,{id:"security-transport",value:t.security.transport,placeholder:"https",onChange:W=>z("transport",W.target.value)})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"security-encryption",children:"Encryption"}),r.jsx(Fe,{id:"security-encryption",value:t.security.encryption,placeholder:"TLS 1.3",onChange:W=>z("encryption",W.target.value)})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"security-notes",children:"Security Notes"}),r.jsx(Fe,{id:"security-notes",value:t.security.notes,placeholder:"Requests must be encrypted over TLS.",onChange:W=>z("notes",W.target.value)})]})]})]})]})}),r.jsx(Kr,{value:"capabilities",children:r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Capabilities"}),r.jsx(qt,{children:"Describe the skills other agents can invoke."})]}),r.jsxs(Be,{className:"space-y-4",children:[t.capabilities.length===0&&r.jsx("div",{className:"rounded-lg border border-dashed border-border bg-muted/40 p-6 text-center text-sm text-muted-foreground",children:"No capabilities defined yet. Add one to expose functionality for peer agents."}),t.capabilities.map((W,ae)=>r.jsxs(Ie,{className:"border border-border/60",children:[r.jsxs(nt,{className:"flex flex-col gap-2 space-y-0 md:flex-row md:items-center",children:[r.jsxs("div",{className:"flex flex-1 flex-col",children:[r.jsxs(st,{className:"text-lg font-semibold",children:["Capability #",ae+1]}),r.jsx(qt,{children:"Toggle availability and describe request contracts."})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("label",{className:"flex items-center gap-2 text-sm font-medium",children:[r.jsx(ds,{checked:W.enabled,onCheckedChange:se=>X(ae,{enabled:!!se})}),"Expose capability"]}),r.jsxs(re,{size:"icon",variant:"ghost",onClick:()=>Y(ae),title:"Remove capability",children:[r.jsx(Sn,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Remove capability"})]})]})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Capability ID"}),r.jsx(Fe,{value:W.id,placeholder:"create-proposal",onChange:se=>X(ae,{id:se.target.value})})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Skill"}),r.jsx(Fe,{value:W.skill,placeholder:"proposal_management.create",onChange:se=>X(ae,{skill:se.target.value})})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Description"}),r.jsx(ar,{value:W.description,placeholder:"Creates a new proposal record containing intent, plan, and artifacts.",rows:3,onChange:se=>X(ae,{description:se.target.value})})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Endpoint"}),r.jsx(Fe,{value:W.endpoint,placeholder:"https://coconut.dev/api/v1/proposals",onChange:se=>X(ae,{endpoint:se.target.value})})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"HTTP Method"}),r.jsxs(Zt,{value:W.method,onValueChange:se=>X(ae,{method:se}),children:[r.jsx(Wt,{children:r.jsx(Qt,{placeholder:"Select method"})}),r.jsx(Vt,{children:hde.map(se=>r.jsx(Le,{value:se,children:se},se))})]})]})]}),r.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Input MIME Type"}),r.jsx(Fe,{value:W.inputMimeType??"",placeholder:"application/json",onChange:se=>X(ae,{inputMimeType:se.target.value})}),r.jsx(be,{children:"Input Schema (JSON)"}),r.jsx(ar,{value:W.inputSchema??"",placeholder:'{ "type": "object", "properties": { "title": { "type": "string" } } }',rows:5,onChange:se=>X(ae,{inputSchema:se.target.value})})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"Output MIME Type"}),r.jsx(Fe,{value:W.outputMimeType??"",placeholder:"application/json",onChange:se=>X(ae,{outputMimeType:se.target.value})}),r.jsx(be,{children:"Output Schema (JSON)"}),r.jsx(ar,{value:W.outputSchema??"",placeholder:'{ "type": "object", "properties": { "status": { "type": "string" } } }',rows:5,onChange:se=>X(ae,{outputSchema:se.target.value})})]})]})]})]},`${W.id||"capability"}-${ae}`))]}),r.jsx(s6,{children:r.jsxs(re,{type:"button",variant:"outline",onClick:P,children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"Add Capability"]})})]})}),r.jsx(Kr,{value:"contact",children:r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Contact"}),r.jsx(qt,{children:"Provide a human escalation path for peer agents."})]}),r.jsxs(Be,{className:"grid gap-4 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"contact-name",children:"Contact Name"}),r.jsx(Fe,{id:"contact-name",value:t.contact.name,placeholder:"Coconut DevOps Team",onChange:W=>Q("name",W.target.value)})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"contact-email",children:"Contact Email"}),r.jsx(Fe,{id:"contact-email",value:t.contact.email,placeholder:"support@coconut.dev",onChange:W=>Q("email",W.target.value)})]})]})]})}),r.jsx(Kr,{value:"preview",children:r.jsxs(Ie,{children:[r.jsx(nt,{children:r.jsxs("div",{className:"flex items-center justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx(st,{children:"Preview"}),r.jsx(qt,{children:"Review the JSON payload served at /.well-known/agent-card.json."})]}),r.jsx(re,{variant:"outline",size:"sm",onClick:te,className:"gap-2",children:_?r.jsxs(r.Fragment,{children:[r.jsx(jd,{className:"h-4 w-4"}),"Copied"]}):r.jsxs(r.Fragment,{children:[r.jsx(Od,{className:"h-4 w-4"}),"Copy"]})})]})}),r.jsx(Be,{children:r.jsx("pre",{className:"max-h-96 overflow-auto rounded-md bg-muted p-4 text-sm",children:JSON.stringify((()=>{try{return F()}catch{return{id:t.id,name:t.name,description:t.description,version:t.version,url:t.url,protocols:t.protocols}}})(),null,2)})})]})})]})]})}const gde=[{title:"Coconut Profile",href:"/settings/user",icon:SH,description:"Manage the Coconut's profile information."},{title:"User Preferences",href:"/settings/preferences",icon:fH,description:"Configure individual workspace preferences"},{title:"Authentication",href:"/settings/authentication",icon:$I,description:"Configure authentication and user access"},{title:"API Keys",href:"/settings/api-keys",icon:sm,description:"Manage API keys for programmatic access"},{title:"Symlinks",href:"/settings/rules",icon:Nr,description:"Manage symlinks for easy access to project rules and configurations"},{title:"AI & LLM",href:"/settings/integrations",icon:ZU,description:"Connect Coconut to LLM providers and automation hooks"},{title:"Git",href:"/settings/git",icon:Ri,description:"Configure repository defaults like worktree paths"},{title:"MCP",href:"/settings/mcp",icon:HI,description:"Model Context Protocol configuration and settings"}];function bde(){const e=Mr();return r.jsxs("div",{className:"flex flex-col space-y-8 lg:flex-row lg:space-x-12 lg:space-y-0",children:[r.jsx("aside",{className:"lg:w-1/5",children:r.jsx("nav",{className:"flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1",children:gde.map(t=>r.jsxs(it,{to:t.href,className:Te("inline-flex items-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground h-9 px-4 py-2 hover:bg-accent justify-start",e.pathname===t.href?"bg-accent text-accent-foreground":"text-muted-foreground"),children:[r.jsx(t.icon,{className:"mr-2 h-4 w-4"}),r.jsx("span",{className:"hidden lg:inline",children:t.title})]},t.href))})}),r.jsx("div",{className:"flex-1 lg:max-w-2xl",children:r.jsx("div",{className:"space-y-6",children:r.jsx(HD,{})})})]})}const N0=[{id:"software-engineer",title:"Software Engineer",description:"Builds, refactors, and reviews high-quality code across stacks. Excellent at translating specs into implementation and optimizing system performance. Strong at debugging, architecture patterns, and accelerating development velocity."},{id:"product-strategist",title:"Product Strategist",description:"Defines product direction, clarifies requirements, and aligns work with user and business goals. Skilled in roadmap planning, prioritization, and transforming ambiguous ideas into actionable plans."},{id:"researcher",title:"Researcher",description:"Investigates topics deeply, synthesizes information, and produces evidence-based insights. Strong at literature review, competitive analysis, and generating clear summaries to inform decisions."},{id:"designer",title:"Designer",description:"Creates intuitive interfaces, user flows, and visual assets. Focused on usability, accessibility, and crafting polished experiences. Strong at wireframing and turning requirements into elegant solutions."},{id:"qa-engineer",title:"QA Engineer",description:"Identifies bugs, edge cases, and reliability gaps. Produces test plans, automated tests, and reproducible reports. Strong at ensuring product quality and preventing regressions."},{id:"devops-engineer",title:"DevOps Engineer",description:"Manages infrastructure, deployments, and operational reliability. Skilled with CI/CD, observability, automation, and environment provisioning. Ensures systems are scalable and fault-tolerant."},{id:"data-analyst",title:"Data Analyst",description:"Analyzes data, defines metrics, and generates actionable insights. Strong in SQL, visualization, experimentation, and turning raw data into strategic recommendations."},{id:"marketer",title:"Marketer",description:"Creates campaigns, messaging, and positioning to reach target audiences. Skilled in content, funnels, and brand strategy. Strong at synthesizing market needs and shaping demand."},{id:"sales-partnerships-agent",title:"Sales & Partnerships Agent",description:"Identifies prospects, crafts outreach, and develops strategic relationships. Strong at value articulation, objection handling, and mapping product capabilities to customer needs."},{id:"growth-operator",title:"Growth Operator",description:"Optimizes acquisition, activation, and retention through experimentation. Skilled in funnel analysis, rapid testing, and leveraging data for compounding growth."},{id:"customer-success-specialist",title:"Customer Success Specialist",description:"Ensures users succeed by providing onboarding, guidance, and proactive support. Strong at diagnosing user challenges and improving long-term satisfaction and retention."},{id:"orchestration-engineer",title:"Orchestration Engineer",description:"Coordinates multi-agent workflows, dependencies, and handoffs. Strong at breaking large tasks into sequenced steps and ensuring agents operate cohesively and efficiently."},{id:"context-curator",title:"Context Curator",description:"Maintains clean, accurate project context by organizing files, logs, and knowledge. Strong at eliminating ambiguity, ensuring agents have the right information at the right time."},{id:"documentation-writer",title:"Documentation Writer",description:"Produces clear technical docs, guides, READMEs, and CP summaries. Strong at structuring complex information and keeping knowledge bases up to date and accessible."}];function ND(){const[e,t]=w.useState({}),[n,s]=w.useState(null),[a,o]=w.useState(!1),[u,c]=w.useState(!0),[d,h]=w.useState(!1),{toast:p}=bn();w.useEffect(()=>{m()},[]);const m=async()=>{try{try{const b=await fetch(`${Ae}/api/v1/config`),y=await b.json();if(b.ok&&y?.success){const E=y.data?.coconut||{};s(E.id??null),(E.firstName||E.lastName||E.email||E.role||E.roleDescription)&&t({firstName:E.firstName,lastName:E.lastName,email:E.email,role:E.role,roleDescription:E.roleDescription})}else s(null)}catch(b){console.error("Failed to load coconut config:",b),s(null)}}catch(b){console.error("Failed to load settings:",b),p({title:"Error",description:"Failed to load user settings",variant:"destructive"})}finally{c(!1)}},g=async()=>{h(!0);try{const y=await(await fetch(`${Ae}/api/v1/config`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({coconut:{...e,id:n||void 0}})})).json();if(y.success)p({title:"Success",description:"Settings saved successfully"});else throw new Error(y.error||"Failed to save settings")}catch(b){console.error("Failed to save settings:",b),p({title:"Error",description:"Failed to save settings",variant:"destructive"})}finally{h(!1)}},v=b=>{t(y=>{const E={...y,...b};if(b.role!==void 0){const _=N0.find(N=>N.id===b.role);_?.description&&(E.roleDescription=_.description)}return E})},C=w.useMemo(()=>e.role&&N0.find(y=>y.id===e.role)?.description||null,[e.role]),S=async()=>{if(n)try{await navigator.clipboard.writeText(n),o(!0),p({title:"Copied",description:"Coconut ID copied to clipboard."}),setTimeout(()=>o(!1),1500)}catch(b){console.error("Failed to copy coconut ID:",b),p({title:"Copy failed",description:"Unable to copy the Coconut ID to the clipboard.",variant:"destructive"})}};return u?r.jsx("div",{children:"Loading..."}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"Coconut Settings"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage the Coconut's profile information."})]}),r.jsx(or,{}),r.jsx("div",{className:"rounded-lg border border-dashed bg-muted/40 p-4",children:n?r.jsxs("div",{className:"flex items-center justify-between gap-3",children:[r.jsxs("div",{className:"flex flex-col",children:[r.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Coconut ID"}),r.jsx("p",{className:"mt-1 font-mono text-sm",children:n})]}),r.jsxs(re,{variant:"outline",size:"sm",onClick:S,children:[a?r.jsx(jd,{className:"h-4 w-4"}):r.jsx(Od,{className:"h-4 w-4"}),r.jsx("span",{className:"ml-2",children:a?"Copied":"Copy"})]})]}):r.jsxs("div",{className:"space-y-1",children:[r.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Coconut ID not configured"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Add an `id` under the `coconut` section in `.nut/config.json` to register this Coconut instance."})]})}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Coconut Profile"}),r.jsx(qt,{children:"Update the Coconut's identifying details and role."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"firstName",children:"First Name"}),r.jsx(Fe,{id:"firstName",value:e.firstName||"",onChange:b=>v({firstName:b.target.value}),placeholder:"Enter first name"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"lastName",children:"Last Name"}),r.jsx(Fe,{id:"lastName",value:e.lastName||"",onChange:b=>v({lastName:b.target.value}),placeholder:"Enter last name"})]})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"email",children:"Email"}),r.jsx(Fe,{id:"email",type:"email",value:e.email||"",onChange:b=>v({email:b.target.value}),placeholder:"Enter email address"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"role",children:"Role"}),r.jsxs(Zt,{value:e.role,onValueChange:b=>v({role:b}),children:[r.jsx(Wt,{children:r.jsx(Qt,{placeholder:"Select role"})}),r.jsx(Vt,{children:N0.map(b=>r.jsx(Le,{value:b.id,children:b.title},b.id))})]}),C&&r.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:C})]})]})]}),r.jsxs("p",{className:"text-sm text-muted-foreground",children:["You can also manage the Coconut's identity to other agents on the"," ",r.jsx(it,{to:"/identity",className:"underline underline-offset-4 hover:text-primary",children:"Identity page"}),"."]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx(re,{variant:"outline",onClick:m,disabled:d,children:"Cancel"}),r.jsx(re,{onClick:g,disabled:d,children:d?"Saving...":"Save Changes"})]})]})}function xde(){const{user:e,authEnabled:t,checkAuthStatus:n}=uc(),[s,a]=w.useState(null),[o,u]=w.useState(!0),[c,d]=w.useState(!1),[h,p]=w.useState(!1),[m,g]=w.useState(""),[v,C]=w.useState(""),[S,b]=w.useState("viewer"),[y,E]=w.useState(null),[_,N]=w.useState(""),A=!t||e?.role==="admin";w.useEffect(()=>{k()},[]);const k=async()=>{try{u(!0);const z=await Tn("/api/v1/auth-settings");z.success?a(z.data):a(null)}catch(z){console.error("Failed to load auth settings:",z),a(null)}finally{u(!1)}},I=async()=>{if(!s)return;const z=!s.enabled;try{const Q=await Tn("/api/v1/auth-settings",{method:"PUT",body:JSON.stringify({enabled:z})});if(Q.success)a({...s,enabled:z}),await n(),Et({title:"Success",description:`Authentication ${z?"enabled":"disabled"}`});else throw new Error(Q.error||"Failed to toggle auth")}catch(Q){Et({title:"Error",description:Q.message||"Failed to toggle authentication",variant:"destructive"})}},R=async()=>{if(!s)return;const z=!s.allowRegistration;try{const Q=await Tn("/api/v1/auth-settings",{method:"PUT",body:JSON.stringify({allowRegistration:z})});if(Q.success)a({...s,allowRegistration:z}),Et({title:"Success",description:`Self-registration ${z?"enabled":"disabled"}`});else throw new Error(Q.error||"Failed to update setting")}catch(Q){Et({title:"Error",description:Q.message||"Failed to update setting",variant:"destructive"})}},M=async()=>{if(!m||!v){Et({title:"Error",description:"Please provide email and name",variant:"destructive"});return}try{const z=await Tn("/api/v1/auth-settings/users",{method:"POST",body:JSON.stringify({email:m,name:v,role:S})});if(z.success)await k(),p(!1),g(""),C(""),b("viewer"),Et({title:"Success",description:"User added to whitelist"});else throw new Error(z.error||"Failed to add user")}catch(z){Et({title:"Error",description:z.message||"Failed to add user",variant:"destructive"})}},L=async z=>{try{const Q=await Tn(`/api/v1/auth-settings/users/${z}`,{method:"DELETE"});if(Q.success)await k(),Et({title:"Success",description:"User removed from whitelist"});else throw new Error(Q.error||"Failed to remove user")}catch(Q){Et({title:"Error",description:Q.message||"Failed to remove user",variant:"destructive"})}},$=async(z,Q)=>{try{const P=await Tn(`/api/v1/auth-settings/users/${z}`,{method:"PUT",body:JSON.stringify({role:Q})});if(P.success)await k(),Et({title:"Success",description:"User role updated"});else throw new Error(P.error||"Failed to update role")}catch(P){Et({title:"Error",description:P.message||"Failed to update role",variant:"destructive"})}},H=async()=>{if(!(!y||!_)){if(_.length<8){Et({title:"Error",description:"Password must be at least 8 characters",variant:"destructive"});return}try{const z=await Tn(`/api/v1/auth-settings/users/${y}/reset-password`,{method:"POST",body:JSON.stringify({newPassword:_})});if(z.success)E(null),N(""),Et({title:"Success",description:"Password reset successfully"});else throw new Error(z.error||"Failed to reset password")}catch(z){Et({title:"Error",description:z.message||"Failed to reset password",variant:"destructive"})}}},B=async()=>{if(s)try{d(!0);const z=await Tn("/api/v1/auth-settings",{method:"PUT",body:JSON.stringify({session:s.session})});if(z.success)Et({title:"Success",description:"Session settings updated"});else throw new Error(z.error||"Failed to update settings")}catch(z){Et({title:"Error",description:z.message||"Failed to update settings",variant:"destructive"})}finally{d(!1)}};return o?r.jsx("div",{children:"Loading..."}):s?A?r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"Authentication"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage authentication settings and user access."})]}),r.jsx(or,{}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx($I,{className:"h-5 w-5"}),r.jsx(st,{children:"Authentication Status"})]}),r.jsx(qt,{children:"Control whether authentication is required to access Coconut."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"auth-enabled",children:"Require Authentication"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"When enabled, users must log in to access Coconut"})]}),r.jsx(Fa,{id:"auth-enabled",checked:s.enabled,onCheckedChange:I})]}),s.enabled&&r.jsxs("div",{className:"flex items-center justify-between pt-2 border-t",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"allow-registration",children:"Allow Self-Registration"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Whitelisted users can create their own accounts"})]}),r.jsx(Fa,{id:"allow-registration",checked:s.allowRegistration,onCheckedChange:R})]})]})]}),r.jsxs(Ie,{children:[r.jsx(nt,{children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx(st,{children:"Whitelisted Users"}),r.jsx(qt,{children:"Manage users who can access this Coconut instance."})]}),r.jsxs(fn,{open:h,onOpenChange:p,children:[r.jsx(Cp,{asChild:!0,children:r.jsxs(re,{size:"sm",children:[r.jsx(TH,{className:"h-4 w-4 mr-2"}),"Add User"]})}),r.jsxs(ln,{children:[r.jsxs(nn,{children:[r.jsx(rn,{children:"Add User to Whitelist"}),r.jsx(_n,{children:"Add a user's email to allow them to register and access Coconut."})]}),r.jsxs("div",{className:"space-y-4 py-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"new-email",children:"Email"}),r.jsx(Fe,{id:"new-email",type:"email",value:m,onChange:z=>g(z.target.value),placeholder:"user@example.com"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"new-name",children:"Name"}),r.jsx(Fe,{id:"new-name",value:v,onChange:z=>C(z.target.value),placeholder:"User Name"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"new-role",children:"Role"}),r.jsxs(Zt,{value:S,onValueChange:z=>b(z),children:[r.jsx(Wt,{children:r.jsx(Qt,{})}),r.jsxs(Vt,{children:[r.jsx(Le,{value:"viewer",children:"Viewer"}),r.jsx(Le,{value:"engineer",children:"Engineer"}),r.jsx(Le,{value:"designer",children:"Designer"}),r.jsx(Le,{value:"product_manager",children:"Product Manager"}),r.jsx(Le,{value:"manager",children:"Manager"}),r.jsx(Le,{value:"admin",children:"Admin"})]})]})]})]}),r.jsxs(lr,{children:[r.jsx(re,{variant:"outline",onClick:()=>p(!1),children:"Cancel"}),r.jsx(re,{onClick:M,children:"Add User"})]})]})]})]})}),r.jsx(Be,{children:r.jsx("div",{className:"space-y-4",children:s.providers.local.users.map(z=>r.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[r.jsxs("div",{className:"space-y-1 flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("p",{className:"font-medium",children:z.name}),z.registered?r.jsx(ut,{variant:"default",className:"text-xs",children:"Registered"}):r.jsx(ut,{variant:"secondary",className:"text-xs",children:"Pending"}),z.id===e?.id&&r.jsx(ut,{variant:"outline",className:"text-xs",children:"You"})]}),r.jsx("p",{className:"text-sm text-muted-foreground",children:z.email}),z.lastLoginAt&&r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Last login: ",new Date(z.lastLoginAt).toLocaleString()]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs(Zt,{value:z.role,onValueChange:Q=>$(z.id,Q),children:[r.jsx(Wt,{className:"w-40",children:r.jsx(Qt,{})}),r.jsxs(Vt,{children:[r.jsx(Le,{value:"viewer",children:"Viewer"}),r.jsx(Le,{value:"engineer",children:"Engineer"}),r.jsx(Le,{value:"designer",children:"Designer"}),r.jsx(Le,{value:"product_manager",children:"Product Manager"}),r.jsx(Le,{value:"manager",children:"Manager"}),r.jsx(Le,{value:"admin",children:"Admin"})]})]}),r.jsxs(fn,{open:y===z.id,onOpenChange:Q=>{Q||(E(null),N(""))},children:[r.jsx(Cp,{asChild:!0,children:r.jsx(re,{size:"sm",variant:"outline",onClick:()=>E(z.id),children:r.jsx(NU,{className:"h-4 w-4"})})}),r.jsxs(ln,{children:[r.jsxs(nn,{children:[r.jsx(rn,{children:"Reset Password"}),r.jsxs(_n,{children:["Set a new password for ",z.name]})]}),r.jsx("div",{className:"space-y-4 py-4",children:r.jsxs("div",{children:[r.jsx(be,{htmlFor:"reset-password",children:"New Password"}),r.jsx(Fe,{id:"reset-password",type:"password",value:_,onChange:Q=>N(Q.target.value),placeholder:"At least 8 characters",minLength:8})]})}),r.jsxs(lr,{children:[r.jsx(re,{variant:"outline",onClick:()=>{E(null),N("")},children:"Cancel"}),r.jsx(re,{onClick:H,children:"Reset Password"})]})]})]}),z.id!==e?.id&&r.jsxs(Oi,{children:[r.jsx(tc,{asChild:!0,children:r.jsx(re,{size:"sm",variant:"destructive",children:r.jsx(Sn,{className:"h-4 w-4"})})}),r.jsxs(Pa,{children:[r.jsxs(Ba,{children:[r.jsx(Ha,{children:"Remove User"}),r.jsxs($a,{children:["Are you sure you want to remove ",z.name," from the whitelist? They will no longer be able to access Coconut."]})]}),r.jsxs(Ua,{children:[r.jsx(Ga,{children:"Cancel"}),r.jsx(za,{onClick:()=>L(z.id),children:"Remove"})]})]})]})]})]},z.id))})})]}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Session Settings"}),r.jsx(qt,{children:"Configure session behavior and security."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"session-expiry",children:"Session Expiry"}),r.jsx(Fe,{id:"session-expiry",value:s.session.expiresIn,onChange:z=>a({...s,session:{...s.session,expiresIn:z.target.value}}),placeholder:"7d"}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Format: 30s, 15m, 24h, 7d"})]}),r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"secure-cookies",children:"Secure Cookies (HTTPS only)"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Enable in production with HTTPS"})]}),r.jsx(Fa,{id:"secure-cookies",checked:s.session.secure||!1,onCheckedChange:z=>a({...s,session:{...s.session,secure:z}})})]})]})]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx(re,{variant:"outline",onClick:k,disabled:c,children:"Cancel"}),r.jsx(re,{onClick:B,disabled:c,children:c?"Saving...":"Save Session Settings"})]})]}):r.jsx("div",{className:"space-y-6",children:r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"Authentication"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"You don't have permission to manage authentication settings."})]})}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"Authentication"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Secure your Coconut instance with authentication."})]}),r.jsx(or,{}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Ii,{className:"h-5 w-5 text-muted-foreground"}),r.jsx(st,{children:"Authentication Not Configured"})]}),r.jsx(qt,{children:"Authentication has not been initialized. Use the CLI to set up authentication."})]}),r.jsxs(Be,{children:[r.jsx("div",{className:"bg-muted p-4 rounded-md",children:r.jsxs("code",{className:"text-sm",children:["$ nut auth init",r.jsx("br",{}),"$ nut auth toggle"]})}),r.jsx("p",{className:"text-sm text-muted-foreground mt-4",children:"This will create an admin user and enable authentication for your Coconut instance."})]})]})]})}function vde(){const{authEnabled:e}=uc(),[t,n]=w.useState([]),[s,a]=w.useState(!0),[o,u]=w.useState(!1),[c,d]=w.useState(!1),[h,p]=w.useState(""),[m,g]=w.useState("never"),[v,C]=w.useState(null),[S,b]=w.useState(null);w.useEffect(()=>{y()},[]);const y=async()=>{a(!0);try{const L=await Tn("/api/v1/api-keys");L.success&&n(L.data?.apiKeys||[])}catch(L){console.error("Failed to load API keys:",L),n([])}finally{a(!1)}},E=async()=>{if(!h.trim()){Et({title:"Error",description:"Please provide a name for the API key",variant:"destructive"});return}try{const L={name:h,scopes:["*"]};m!=="never"&&(L.expiresIn=m);const $=await Tn("/api/v1/api-keys",{method:"POST",body:JSON.stringify(L)});$.success&&(C($.data),u(!1),d(!0),p(""),g("never"),await y(),Et({title:"API Key Created",description:"Make sure to copy your API key now. You won't be able to see it again!"}))}catch(L){console.error("Failed to create API key:",L),Et({title:"Error",description:"Failed to create API key",variant:"destructive"})}},_=async L=>{try{(await Tn(`/api/v1/api-keys/${L}`,{method:"DELETE"})).success&&(await y(),b(null),Et({title:"API Key Deleted",description:"The API key has been permanently deleted"}))}catch($){console.error("Failed to delete API key:",$),Et({title:"Error",description:"Failed to delete API key",variant:"destructive"})}},N=async L=>{try{await navigator.clipboard.writeText(L),Et({title:"Copied",description:"API key copied to clipboard"})}catch{Et({title:"Error",description:"Failed to copy to clipboard",variant:"destructive"})}},A=L=>new Date(L).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),k=L=>L?new Date(L)<new Date:!1,I=typeof window<"u"?window.location.origin:"http://localhost:3000",R=v?`curl -H "X-API-Key: ${v.key}" \\
|
|
966
966
|
+ ${I}/api/v1/proposals`:"",M=e?null:r.jsxs(xo,{children:[r.jsx(O2,{className:"h-4 w-4"}),r.jsxs(vo,{children:["Authentication is currently disabled. API keys will only be required once you enable authentication in the ",r.jsx("a",{href:"/settings/authentication",className:"underline",children:"Authentication settings"}),"."]})]});return!e&&s?r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"API Keys"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage API keys for programmatic access"})]}),M]}):s?r.jsx("div",{className:"space-y-6",children:r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"API Keys"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]})}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"API Keys"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage API keys for programmatic access to your Coconut instance"})]}),M,e&&r.jsxs(xo,{children:[r.jsx(O2,{className:"h-4 w-4"}),r.jsxs(vo,{children:["API keys provide programmatic access to your Coconut instance. Use them in CI/CD pipelines or automation scripts by including the key in the ",r.jsx("code",{className:"bg-muted px-1 py-0.5 rounded",children:"X-API-Key"})," header."]})]}),r.jsxs(Ie,{children:[r.jsx(nt,{children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx(st,{children:"Active API Keys"}),r.jsx(qt,{children:"API keys you've created for programmatic access"})]}),r.jsxs(re,{onClick:()=>u(!0),disabled:!e,children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"Create API Key"]})]})}),r.jsx(Be,{children:t.length===0?r.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[r.jsx(sm,{className:"h-12 w-12 mx-auto mb-4 opacity-20"}),r.jsx("p",{children:"No API keys yet"}),r.jsx("p",{className:"text-sm",children:"Create an API key to get started with programmatic access"})]}):r.jsx("div",{className:"space-y-4",children:t.map(L=>r.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx("p",{className:"font-medium",children:L.name}),k(L.expiresAt)&&r.jsx(ut,{variant:"destructive",children:"Expired"})]}),r.jsx("p",{className:"text-sm text-muted-foreground font-mono",children:L.keyPreview}),r.jsxs("div",{className:"flex items-center gap-4 mt-2 text-xs text-muted-foreground",children:[r.jsxs("span",{children:["Created: ",A(L.createdAt)]}),L.expiresAt&&r.jsxs("span",{children:["Expires: ",A(L.expiresAt)]}),L.lastUsedAt&&r.jsxs("span",{children:["Last used: ",A(L.lastUsedAt)]})]})]}),r.jsx(re,{variant:"ghost",size:"icon",onClick:()=>b(L.id),children:r.jsx(Sn,{className:"h-4 w-4 text-destructive"})})]},L.id))})})]}),r.jsx(fn,{open:o,onOpenChange:u,children:r.jsxs(ln,{children:[r.jsxs(nn,{children:[r.jsx(rn,{children:"Create API Key"}),r.jsx(_n,{children:"Create a new API key for programmatic access. The key will only be shown once."})]}),r.jsxs("div",{className:"space-y-4 py-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"keyName",children:"Name"}),r.jsx(Fe,{id:"keyName",placeholder:"CI/CD Pipeline",value:h,onChange:L=>p(L.target.value)}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"A descriptive name to identify this API key"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"keyExpiry",children:"Expiration"}),r.jsxs("select",{id:"keyExpiry",className:"w-full rounded-md border border-input bg-background px-3 py-2 text-sm",value:m,onChange:L=>g(L.target.value),children:[r.jsx("option",{value:"never",children:"Never"}),r.jsx("option",{value:"30d",children:"30 days"}),r.jsx("option",{value:"90d",children:"90 days"}),r.jsx("option",{value:"1y",children:"1 year"})]})]})]}),r.jsxs(lr,{children:[r.jsx(re,{variant:"outline",onClick:()=>u(!1),children:"Cancel"}),r.jsx(re,{onClick:E,disabled:!e,children:"Create API Key"})]})]})}),r.jsx(fn,{open:c,onOpenChange:d,children:r.jsxs(ln,{className:"sm:max-w-[600px]",children:[r.jsxs(nn,{children:[r.jsx(rn,{children:"API Key Created"}),r.jsx(_n,{children:"Make sure to copy your API key now. You won't be able to see it again!"})]}),r.jsxs(xo,{variant:"destructive",className:"my-4",children:[r.jsx(Ii,{className:"h-4 w-4"}),r.jsx(vo,{children:"This is the only time you will see this key. Store it securely."})]}),v&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{children:"API Key"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(Fe,{readOnly:!0,value:v.key,className:"font-mono text-sm"}),r.jsx(re,{variant:"outline",size:"icon",onClick:()=>N(v.key),children:r.jsx(la,{className:"h-4 w-4"})})]})]}),r.jsxs("div",{className:"text-sm text-muted-foreground",children:[r.jsx("p",{className:"mb-2",children:"Usage example:"}),r.jsx("pre",{className:"bg-muted p-3 rounded-md whitespace-pre-wrap break-words",children:r.jsx("code",{className:"font-mono text-xs",children:R})})]})]}),r.jsx(lr,{children:r.jsx(re,{onClick:()=>{d(!1),C(null)},children:"I've Saved My Key"})})]})}),r.jsx(fn,{open:!!S,onOpenChange:L=>!L&&b(null),children:r.jsxs(ln,{children:[r.jsxs(nn,{children:[r.jsx(rn,{children:"Delete API Key"}),r.jsx(_n,{children:"Are you sure you want to delete this API key? This action cannot be undone and any scripts using this key will stop working."})]}),r.jsxs(lr,{children:[r.jsx(re,{variant:"outline",onClick:()=>b(null),children:"Cancel"}),r.jsx(re,{variant:"destructive",onClick:()=>S&&_(S),children:"Delete API Key"})]})]})})]})}function yde(){const e=[{id:"1",name:"Code Review Agent",description:"Automatically reviews pull requests and provides feedback",type:"Code Review",status:"active",model:"claude-3.5-sonnet",lastRun:"5 minutes ago",runsToday:23,successRate:"94%"},{id:"2",name:"Documentation Agent",description:"Generates and updates code documentation automatically",type:"Documentation",status:"paused",model:"gpt-4",lastRun:"2 hours ago",runsToday:8,successRate:"98%"},{id:"3",name:"Bug Hunter Agent",description:"Scans code for potential bugs and security vulnerabilities",type:"Quality Assurance",status:"active",model:"gemini-pro",lastRun:"15 minutes ago",runsToday:12,successRate:"87%"},{id:"4",name:"Performance Monitor",description:"Monitors application performance and suggests optimizations",type:"Performance",status:"inactive",model:"claude-3-haiku",lastRun:"1 day ago",runsToday:0,successRate:"91%"}],t=["Code Review","Documentation","Quality Assurance","Performance","Security","Refactoring","Testing","Architecture"],n=["claude-3.5-sonnet","claude-3-haiku","gpt-4","gpt-3.5-turbo","gemini-pro","gemini-flash"],s=o=>{switch(o){case"active":return r.jsx(GI,{className:"h-4 w-4 text-green-500"});case"paused":return r.jsx(B0,{className:"h-4 w-4 text-yellow-500"});case"inactive":return r.jsx("div",{className:"h-4 w-4 rounded-full bg-gray-300"});default:return r.jsx("div",{className:"h-4 w-4 rounded-full bg-gray-300"})}},a=o=>{switch(o){case"active":return r.jsx(ut,{className:"bg-green-100 text-green-800",children:"Active"});case"paused":return r.jsx(ut,{className:"bg-yellow-100 text-yellow-800",children:"Paused"});case"inactive":return r.jsx(ut,{variant:"secondary",children:"Inactive"});default:return r.jsx(ut,{variant:"secondary",children:"Unknown"})}};return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"Agents Management"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure and manage AI agents that automate various development tasks."})]}),r.jsx(or,{}),r.jsxs(Ie,{children:[r.jsx(nt,{children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx(st,{children:"Active Agents"}),r.jsx(qt,{children:"Monitor and control your AI agents across different workflows."})]}),r.jsxs(re,{size:"sm",children:[r.jsx(mn,{className:"h-4 w-4 mr-2"}),"Create Agent"]})]})}),r.jsx(Be,{children:r.jsx("div",{className:"space-y-4",children:e.map(o=>r.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[r.jsxs("div",{className:"flex items-center space-x-4",children:[s(o.status),r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("h4",{className:"font-medium",children:o.name}),a(o.status),r.jsx(ut,{variant:"outline",children:o.type}),r.jsx(ut,{variant:"outline",children:o.model})]}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:o.description}),r.jsxs("div",{className:"flex items-center space-x-4 mt-2",children:[r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Last run: ",o.lastRun]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Runs today: ",o.runsToday]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Success rate: ",o.successRate]})]})]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(re,{variant:"outline",size:"sm",children:r.jsx(E9,{className:"h-4 w-4"})}),o.status==="active"?r.jsx(re,{variant:"outline",size:"sm",children:r.jsx(B0,{className:"h-4 w-4"})}):r.jsx(re,{variant:"outline",size:"sm",children:r.jsx(Ma,{className:"h-4 w-4"})}),r.jsx(re,{variant:"outline",size:"sm",children:r.jsx(Xl,{className:"h-4 w-4"})}),r.jsx(re,{variant:"outline",size:"sm",children:r.jsx(Sn,{className:"h-4 w-4"})})]})]},o.id))})})]}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Create New Agent"}),r.jsx(qt,{children:"Configure a new AI agent to automate specific development tasks."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"agentName",children:"Agent Name"}),r.jsx(Fe,{id:"agentName",placeholder:"Enter agent name"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"agentType",children:"Agent Type"}),r.jsxs(Zt,{children:[r.jsx(Wt,{children:r.jsx(Qt,{placeholder:"Select agent type"})}),r.jsx(Vt,{children:t.map(o=>r.jsx(Le,{value:o.toLowerCase(),children:o},o))})]})]})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"agentDescription",children:"Description"}),r.jsx(Fe,{id:"agentDescription",placeholder:"What does this agent do?"})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"aiModel",children:"AI Model"}),r.jsxs(Zt,{children:[r.jsx(Wt,{children:r.jsx(Qt,{placeholder:"Select AI model"})}),r.jsx(Vt,{children:n.map(o=>r.jsx(Le,{value:o,children:o},o))})]})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"systemPrompt",children:"System Prompt"}),r.jsxs(Zt,{children:[r.jsx(Wt,{children:r.jsx(Qt,{placeholder:"Select system prompt"})}),r.jsxs(Vt,{children:[r.jsx(Le,{value:"code-review",children:"Code Review Assistant"}),r.jsx(Le,{value:"documentation",children:"Documentation Generator"}),r.jsx(Le,{value:"bug-analysis",children:"Bug Analysis Expert"}),r.jsx(Le,{value:"architecture",children:"Architecture Advisor"})]})]})]})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"triggers",children:"Triggers"}),r.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:["Pull Request","Commit","File Change","Schedule","Manual"].map(o=>r.jsxs("label",{className:"flex items-center space-x-2",children:[r.jsx("input",{type:"checkbox",className:"rounded"}),r.jsx("span",{className:"text-sm",children:o})]},o))})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"configuration",children:"Agent Configuration (JSON)"}),r.jsx("textarea",{id:"configuration",className:"w-full min-h-[120px] p-3 border rounded-md font-mono text-sm",placeholder:'{"maxTokens": 4000, "temperature": 0.3, "timeout": 30}'})]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx(re,{variant:"outline",children:"Test Configuration"}),r.jsx(re,{variant:"outline",children:"Save as Draft"}),r.jsx(re,{children:"Create & Activate"})]})]})]}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Global Agent Settings"}),r.jsx(qt,{children:"Configure global settings that apply to all agents."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"maxConcurrent",children:"Max Concurrent Agents"}),r.jsx(Fe,{id:"maxConcurrent",type:"number",placeholder:"5"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"defaultTimeout",children:"Default Timeout (seconds)"}),r.jsx(Fe,{id:"defaultTimeout",type:"number",placeholder:"30"})]})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"retryPolicy",children:"Retry Policy"}),r.jsxs(Zt,{children:[r.jsx(Wt,{children:r.jsx(Qt,{placeholder:"Select retry policy"})}),r.jsxs(Vt,{children:[r.jsx(Le,{value:"none",children:"No Retries"}),r.jsx(Le,{value:"exponential",children:"Exponential Backoff"}),r.jsx(Le,{value:"linear",children:"Linear Retry"}),r.jsx(Le,{value:"custom",children:"Custom Policy"})]})]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("input",{type:"checkbox",id:"enableLogging",className:"rounded"}),r.jsx(be,{htmlFor:"enableLogging",children:"Enable detailed logging"})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("input",{type:"checkbox",id:"enableMetrics",className:"rounded"}),r.jsx(be,{htmlFor:"enableMetrics",children:"Collect performance metrics"})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("input",{type:"checkbox",id:"enableNotifications",className:"rounded"}),r.jsx(be,{htmlFor:"enableNotifications",children:"Send failure notifications"})]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx(re,{variant:"outline",children:"Reset to Defaults"}),r.jsx(re,{children:"Save Settings"})]})]})]})]})}function Ede(){const[e,t]=w.useState({}),[n,s]=w.useState(!0),[a,o]=w.useState(!1),[u,c]=w.useState({}),[d,h]=w.useState({}),[p,m]=w.useState(op()[0]?.id||"openai/gpt-4o"),[g,v]=w.useState({openrouter:!1,replicate:!1,anthropic:!1,openai:!1,gemini:!1,factorydroid:!1});w.useEffect(()=>{C()},[]);const C=async()=>{try{s(!0);const k=await Tn("/api/v1/config?type=global");if(k.success&&k.data){const I=k.data.apiKeys||{},R={},M={};for(const $ of["openrouter","replicate","anthropic","openai","gemini","factorydroid"]){const H=I[$];H&&typeof H=="string"&&H.trim()!==""?(R[$]=!0,M[$]="***"):(R[$]=!1,M[$]="")}t(M);const L=k.data.defaults&&k.data.defaults.model?String(k.data.defaults.model):void 0;m(L||op()[0]?.id||"openai/gpt-4o")}}catch(k){console.error("Failed to load API keys:",k),Et({title:"Error",description:"Failed to load API keys",variant:"destructive"})}finally{s(!1)}},S=(k,I)=>{t(R=>({...R,[k]:I}))},b=async k=>{try{h(L=>({...L,[k]:!0}));const I=e[k],R={provider:k};I&&I!=="***"&&(R.key=I);const M=await Tn("/api/v1/config/test",{method:"POST",body:JSON.stringify(R)});M.success&&M.message?Et({title:"Test Result",description:M.message}):M.success?Et({title:"Test Result",description:"Success"}):Et({title:"Test Failed",description:M.message||"Unknown error",variant:"destructive"})}catch(I){Et({title:"Test Failed",description:I instanceof Error?I.message:"Unknown error",variant:"destructive"})}finally{h(I=>({...I,[k]:!1}))}},y=k=>{v(I=>({...I,[k]:!I[k]}))},E=async k=>{try{const I={[k]:""};await Tn("/api/v1/config?type=global",{method:"PUT",body:JSON.stringify({apiKeys:I})}),Et({title:"Success",description:`${k} API key cleared`}),await C()}catch(I){console.error("Failed to clear API key:",I),Et({title:"Error",description:"Failed to clear API key",variant:"destructive"})}},_=async k=>{try{c(R=>({...R,[k]:!0}));const I={[k]:e[k]};await Tn("/api/v1/config?type=global",{method:"PUT",body:JSON.stringify({apiKeys:I})}),Et({title:"Success",description:`${k} API key saved`}),await C()}catch(I){console.error("Failed to save API key:",I),Et({title:"Error",description:"Failed to save API key",variant:"destructive"})}finally{c(I=>({...I,[k]:!1}))}},N=async()=>{try{o(!0),await Tn("/api/v1/config?type=global",{method:"PUT",body:JSON.stringify({defaults:{model:p}})}),Et({title:"Success",description:"Default model saved successfully"})}catch(k){console.error("Failed to save default model:",k),Et({title:"Error",description:"Failed to save default model",variant:"destructive"})}finally{o(!1)}},A={openrouter:"OPENROUTER_API_KEY",replicate:"REPLICATE_API_TOKEN",anthropic:"ANTHROPIC_API_KEY",openai:"OPENAI_API_KEY",gemini:"GEMINI_API_KEY",factorydroid:"FACTORY_API_KEY"};return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"AI & LLM"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure Coconut's connections to LLM providers."})]}),r.jsx(or,{}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"API Keys & Authentication"}),r.jsx(qt,{children:"Manage API keys and authentication tokens for integrated services."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"space-y-1 mb-4",children:[r.jsx("p",{className:"text-sm font-medium",children:"AI Assistant API Keys"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"Keys used by the AI Assistant sidebar for chat and code suggestions."})]}),r.jsxs("div",{className:"border rounded-lg",children:[r.jsxs("button",{onClick:()=>y("openrouter"),className:"w-full flex items-center justify-between p-4 hover:bg-muted/50 transition-colors",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:Te("flex items-center justify-center w-8 h-8 rounded-md",e.openrouter&&e.openrouter!==""?"bg-green-100 dark:bg-green-950":"bg-muted"),children:g.openrouter?r.jsx(Fn,{className:"h-4 w-4"}):r.jsx(Ls,{className:"h-4 w-4"})}),r.jsxs("div",{className:"text-left",children:[r.jsx("p",{className:"text-sm font-medium",children:"OpenRouter"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:A.openrouter})]})]}),e.openrouter&&e.openrouter!==""&&r.jsx(os,{className:"h-5 w-5 text-green-600 dark:text-green-400"})]}),g.openrouter&&r.jsxs("div",{className:"p-4 pt-0 space-y-2",children:[r.jsx(be,{htmlFor:"openrouterKey",children:"API Key"}),r.jsxs("div",{className:"flex space-x-2",children:[r.jsx(Fe,{id:"openrouterKey",type:"password",placeholder:"sk-or-v1-...",className:"flex-1",value:e.openrouter||"",onChange:k=>S("openrouter",k.target.value),disabled:n}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>E("openrouter"),title:"Clear API key",children:r.jsx(Sn,{className:"h-4 w-4"})}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>b("openrouter"),disabled:!!d.openrouter,title:"Test API key",children:d.openrouter?"Testing...":"Test"}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>_("openrouter"),disabled:u.openrouter||n,title:"Save API key",children:r.jsx(Vr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your key from"," ",r.jsx("a",{href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"OpenRouter"})]})]})]}),r.jsx(or,{className:"my-6"}),r.jsxs("div",{className:"space-y-1 mb-4",children:[r.jsx("p",{className:"text-sm font-medium",children:"Resource Creation API Keys"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"Keys used for generating images and other resources."})]}),r.jsxs("div",{className:"border rounded-lg",children:[r.jsxs("button",{onClick:()=>y("replicate"),className:"w-full flex items-center justify-between p-4 hover:bg-muted/50 transition-colors",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:Te("flex items-center justify-center w-8 h-8 rounded-md",e.replicate&&e.replicate!==""?"bg-green-100 dark:bg-green-950":"bg-muted"),children:g.replicate?r.jsx(Fn,{className:"h-4 w-4"}):r.jsx(Ls,{className:"h-4 w-4"})}),r.jsxs("div",{className:"text-left",children:[r.jsx("p",{className:"text-sm font-medium",children:"Replicate"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:A.replicate})]})]}),e.replicate&&e.replicate!==""&&r.jsx(os,{className:"h-5 w-5 text-green-600 dark:text-green-400"})]}),g.replicate&&r.jsxs("div",{className:"p-4 pt-0 space-y-2",children:[r.jsx(be,{htmlFor:"replicateKey",children:"API Token"}),r.jsxs("div",{className:"flex space-x-2",children:[r.jsx(Fe,{id:"replicateKey",type:"password",placeholder:"r8_...",className:"flex-1",value:e.replicate||"",onChange:k=>S("replicate",k.target.value),disabled:n}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>E("replicate"),title:"Clear API token",children:r.jsx(Sn,{className:"h-4 w-4"})}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>b("replicate"),disabled:!!d.replicate,title:"Test API token",children:d.replicate?"Testing...":"Test"}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>_("replicate"),disabled:u.replicate||n,title:"Save API token",children:r.jsx(Vr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your token from"," ",r.jsx("a",{href:"https://replicate.com/account/api-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Replicate"})]})]})]}),r.jsx(or,{className:"my-6"}),r.jsxs("div",{className:"space-y-1 mb-4",children:[r.jsx("p",{className:"text-sm font-medium",children:"Coding Agent API Keys"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"These keys are automatically provided to coding agents when they start running."})]}),r.jsxs("div",{className:"border rounded-lg",children:[r.jsxs("button",{onClick:()=>y("anthropic"),className:"w-full flex items-center justify-between p-4 hover:bg-muted/50 transition-colors",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:Te("flex items-center justify-center w-8 h-8 rounded-md",e.anthropic&&e.anthropic!==""?"bg-green-100 dark:bg-green-950":"bg-muted"),children:g.anthropic?r.jsx(Fn,{className:"h-4 w-4"}):r.jsx(Ls,{className:"h-4 w-4"})}),r.jsxs("div",{className:"text-left",children:[r.jsx("p",{className:"text-sm font-medium",children:"Anthropic Claude"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:A.anthropic})]})]}),e.anthropic&&e.anthropic!==""&&r.jsx(os,{className:"h-5 w-5 text-green-600 dark:text-green-400"})]}),g.anthropic&&r.jsxs("div",{className:"p-4 pt-0 space-y-2",children:[r.jsx(be,{htmlFor:"anthropicKey",children:"API Key"}),r.jsxs("div",{className:"flex space-x-2",children:[r.jsx(Fe,{id:"anthropicKey",type:"password",placeholder:"sk-ant-...",className:"flex-1",value:e.anthropic||"",onChange:k=>S("anthropic",k.target.value),disabled:n}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>E("anthropic"),title:"Clear API key",children:r.jsx(Sn,{className:"h-4 w-4"})}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>_("anthropic"),disabled:u.anthropic||n,title:"Save API key",children:r.jsx(Vr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your key from"," ",r.jsx("a",{href:"https://console.anthropic.com/",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Anthropic Console"})]})]})]}),r.jsxs("div",{className:"border rounded-lg",children:[r.jsxs("button",{onClick:()=>y("openai"),className:"w-full flex items-center justify-between p-4 hover:bg-muted/50 transition-colors",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:Te("flex items-center justify-center w-8 h-8 rounded-md",e.openai&&e.openai!==""?"bg-green-100 dark:bg-green-950":"bg-muted"),children:g.openai?r.jsx(Fn,{className:"h-4 w-4"}):r.jsx(Ls,{className:"h-4 w-4"})}),r.jsxs("div",{className:"text-left",children:[r.jsx("p",{className:"text-sm font-medium",children:"OpenAI"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:A.openai})]})]}),e.openai&&e.openai!==""&&r.jsx(os,{className:"h-5 w-5 text-green-600 dark:text-green-400"})]}),g.openai&&r.jsxs("div",{className:"p-4 pt-0 space-y-2",children:[r.jsx(be,{htmlFor:"openaiKey",children:"API Key"}),r.jsxs("div",{className:"flex space-x-2",children:[r.jsx(Fe,{id:"openaiKey",type:"password",placeholder:"sk-...",className:"flex-1",value:e.openai||"",onChange:k=>S("openai",k.target.value),disabled:n}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>E("openai"),title:"Clear API key",children:r.jsx(Sn,{className:"h-4 w-4"})}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>_("openai"),disabled:u.openai||n,title:"Save API key",children:r.jsx(Vr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your key from"," ",r.jsx("a",{href:"https://platform.openai.com/api-keys",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"OpenAI Platform"})]})]})]}),r.jsxs("div",{className:"border rounded-lg",children:[r.jsxs("button",{onClick:()=>y("gemini"),className:"w-full flex items-center justify-between p-4 hover:bg-muted/50 transition-colors",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:Te("flex items-center justify-center w-8 h-8 rounded-md",e.gemini&&e.gemini!==""?"bg-green-100 dark:bg-green-950":"bg-muted"),children:g.gemini?r.jsx(Fn,{className:"h-4 w-4"}):r.jsx(Ls,{className:"h-4 w-4"})}),r.jsxs("div",{className:"text-left",children:[r.jsx("p",{className:"text-sm font-medium",children:"Google Gemini"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:A.gemini})]})]}),e.gemini&&e.gemini!==""&&r.jsx(os,{className:"h-5 w-5 text-green-600 dark:text-green-400"})]}),g.gemini&&r.jsxs("div",{className:"p-4 pt-0 space-y-2",children:[r.jsx(be,{htmlFor:"geminiKey",children:"API Key"}),r.jsxs("div",{className:"flex space-x-2",children:[r.jsx(Fe,{id:"geminiKey",type:"password",placeholder:"AIza...",className:"flex-1",value:e.gemini||"",onChange:k=>S("gemini",k.target.value),disabled:n}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>E("gemini"),title:"Clear API key",children:r.jsx(Sn,{className:"h-4 w-4"})}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>_("gemini"),disabled:u.gemini||n,title:"Save API key",children:r.jsx(Vr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your key from"," ",r.jsx("a",{href:"https://makersuite.google.com/app/apikey",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Google AI Studio"})]})]})]}),r.jsxs("div",{className:"border rounded-lg mt-4",children:[r.jsxs("button",{onClick:()=>y("factorydroid"),className:"w-full flex items-center justify-between p-4 hover:bg-muted/50 transition-colors",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:Te("flex items-center justify-center w-8 h-8 rounded-md",e.factorydroid&&e.factorydroid!==""?"bg-green-100 dark:bg-green-950":"bg-muted"),children:g.factorydroid?r.jsx(Fn,{className:"h-4 w-4"}):r.jsx(Ls,{className:"h-4 w-4"})}),r.jsxs("div",{className:"text-left",children:[r.jsx("p",{className:"text-sm font-medium",children:"Factory Droid"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:A.factorydroid})]})]}),e.factorydroid&&e.factorydroid!==""&&r.jsx(os,{className:"h-5 w-5 text-green-600 dark:text-green-400"})]}),g.factorydroid&&r.jsxs("div",{className:"p-4 pt-0 space-y-2",children:[r.jsx(be,{htmlFor:"factorydroidKey",children:"API Key"}),r.jsxs("div",{className:"flex space-x-2",children:[r.jsx(Fe,{id:"factorydroidKey",type:"password",placeholder:"fd-...",className:"flex-1",value:e.factorydroid||"",onChange:k=>S("factorydroid",k.target.value),disabled:n}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>E("factorydroid"),title:"Clear API key",children:r.jsx(Sn,{className:"h-4 w-4"})}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>_("factorydroid"),disabled:u.factorydroid||n,title:"Save API key",children:r.jsx(Vr,{className:"h-4 w-4"})})]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your key from"," ",r.jsx("a",{href:"https://factorydroid.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Factory Droid"})]})]})]})]})]}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(fd,{className:"h-5 w-5"}),r.jsx(st,{children:"AI Assistant Settings"})]}),r.jsx(qt,{children:"Configure default AI model and behavior for the AI assistant sidebar."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"defaultModel",children:"Default AI Model"}),r.jsxs(Zt,{value:p,onValueChange:m,children:[r.jsx(Wt,{children:r.jsx(Qt,{placeholder:"Select default AI model"})}),r.jsx(Vt,{children:op().map(k=>r.jsx(Le,{value:k.id,children:k.label},k.id))})]}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"This model will be selected by default when opening the AI assistant."})]}),r.jsx("div",{className:"flex justify-end",children:r.jsx(re,{onClick:N,disabled:a||n,children:a?"Saving...":"Save"})})]})]})]})}const T0="../worktrees",zu="../worktrees",Il="coconut/github-auth-state";function Sde(e){const t=e.trim();return t?/^([A-Za-z]:\\|\\\\|\/|~)/.test(t):!1}function _de(){const[e,t]=w.useState(null),[n,s]=w.useState(zu),[a,o]=w.useState("github"),[u,c]=w.useState(!0),[d,h]=w.useState(!1),[p,m]=w.useState(null),[g,v]=w.useState(!1),[C,S]=w.useState(null),[b,y]=w.useState(!1),[E,_]=w.useState(""),[N,A]=w.useState(""),[k,I]=w.useState(!1),[R,M]=w.useState(!1),[L,$]=w.useState(!1),[H,B]=w.useState(!1),[z,Q]=w.useState(""),[P,X]=w.useState(!1),[Y,F]=w.useState(!1),[O,V]=w.useState(!1),te=w.useRef(null),{toast:U}=bn(),W=w.useCallback(async()=>{c(!0);try{const Qe=await(await fetch(`${Ae}/api/v1/git/settings`)).json();if(Qe.success){const vt=Qe.data||{},Gt={defaultWorktreePath:vt.defaultWorktreePath||zu,authMode:vt.authMode||"github"};t(Gt),s(Gt.defaultWorktreePath),o(Gt.authMode)}else throw new Error(Qe.error?.message||"Failed to load settings")}catch(Xe){console.error("Failed to load git settings",Xe),U({title:"Error",description:"Failed to load git settings",variant:"destructive"})}finally{c(!1)}},[U]),ae=w.useCallback(async()=>{v(!0);try{const[Xe,Qe]=await Promise.all([fetch(`${Ae}/api/v1/git/auth-status`).then(vt=>vt.json()),fetch(`${Ae}/api/v1/git/credential-config`).then(vt=>vt.json())]);if(Xe.success)m(Xe.data);else throw new Error(Xe.error?.message||"Failed to check auth status");Qe.success&&S(Qe.data)}catch(Xe){console.error("Failed to check git auth status",Xe),m({authenticated:!1,error:"Failed to check status"})}finally{v(!1)}},[U]),se=a==="github",K=se&&p?.provider==="github",G=!!(se&&p?.authenticated&&p?.provider==="github"),Z=!!(se&&p?.provider==="github"&&!p?.authenticated),ce=w.useMemo(()=>{if(!p?.expiresAt)return null;const Xe=new Date(p.expiresAt);return Number.isNaN(Xe.getTime())?null:Xe.toLocaleString()},[p?.expiresAt]);w.useEffect(()=>{if(typeof window>"u")return;const Xe=Qe=>{Qe.origin===window.location.origin&&Qe.data?.type==="github-auth"&&(te.current&&!te.current.closed&&te.current.close(),te.current=null,localStorage.removeItem(Il),M(!1),Qe.data?.success?(U({title:"GitHub connected",description:"GitHub authorization completed successfully."}),ae()):U({title:"GitHub authorization failed",description:Qe.data?.message||"Authorization was cancelled or failed.",variant:"destructive"}))};return window.addEventListener("message",Xe),()=>window.removeEventListener("message",Xe)},[ae,U]),w.useEffect(()=>{if(typeof window>"u"||!R)return;const Xe=window.setInterval(()=>{te.current&&te.current.closed&&(window.clearInterval(Xe),te.current=null,M(!1),localStorage.removeItem(Il))},500);return()=>window.clearInterval(Xe)},[R]);const le=w.useCallback(async()=>{if(!R&&!(typeof window>"u")){M(!0);try{const Xe=`${window.location.origin}/auth/github/callback`,Qe=await fetch(`${Ae}/api/v1/git/providers/github/authorize`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({callbackUrl:Xe})}),vt=await Qe.json();if(!Qe.ok||!vt.success)throw new Error(vt?.error?.message||"Failed to start GitHub authorization");const Gt=vt?.data?.authorizeUrl,ke=vt?.data?.state;if(!Gt||!ke)throw new Error("Invalid response from authorization endpoint");localStorage.removeItem(Il),localStorage.setItem(Il,ke);const he=window.open(Gt,"github-authorization","width=600,height=700");if(!he)throw localStorage.removeItem(Il),new Error("Popup blocked. Please allow popups and try again.");te.current=he,he.focus()}catch(Xe){M(!1),localStorage.removeItem(Il),U({title:"GitHub authorization failed",description:Xe?.message||"Unable to open GitHub authorization flow.",variant:"destructive"})}}},[R,U]),ne=w.useCallback(async()=>{$(!0);try{const Xe=await fetch(`${Ae}/api/v1/git/providers/github/token`,{method:"DELETE"}),Qe=await Xe.json();if(!Xe.ok||!Qe.success)throw new Error(Qe?.error?.message||"Failed to disconnect GitHub");U({title:"GitHub disconnected",description:"Stored GitHub credentials were removed."}),await ae()}catch(Xe){U({title:"Failed to disconnect GitHub",description:Xe?.message||"Please try again.",variant:"destructive"})}finally{$(!1)}},[ae,U]);w.useEffect(()=>{W(),ae()},[W,ae]);const pe=async()=>{if(!z.trim()){U({title:"Error",description:"Remote URL is required",variant:"destructive"});return}X(!0);try{const Qe=await(await fetch(`${Ae}/api/v1/git/remote`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({remoteUrl:z.trim()})})).json();if(!Qe.success)throw new Error(Qe.error?.message||"Failed to set remote URL");U({title:"Success",description:"Remote URL set successfully"}),B(!1),Q(""),await ae()}catch(Xe){console.error("Failed to set remote URL",Xe),U({title:"Error",description:Xe?.message||"Failed to set remote URL",variant:"destructive"})}finally{X(!1)}},ye=async()=>{F(!0);try{const Qe=await(await fetch(`${Ae}/api/v1/git/remote`,{method:"DELETE"})).json();if(!Qe.success)throw new Error(Qe.error?.message||"Failed to delete remote");U({title:"Success",description:"Remote URL removed"}),await ae()}catch(Xe){console.error("Failed to delete remote",Xe),U({title:"Error",description:Xe?.message||"Failed to delete remote",variant:"destructive"})}finally{F(!1)}},Ge=async()=>{if(!E||!N){U({title:"Error",description:"Username and password are required",variant:"destructive"});return}if(!p?.remote){U({title:"Error",description:"Set a remote URL first before saving credentials",variant:"destructive"});return}I(!0);try{const Qe=await(await fetch(`${Ae}/api/v1/git/credentials`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:E,password:N})})).json();if(!Qe.success)throw new Error(Qe.error?.message||"Failed to save credentials");U({title:"Success",description:"Credentials saved successfully"}),y(!1),_(""),A(""),await ae()}catch(Xe){console.error("Failed to save credentials",Xe),U({title:"Error",description:Xe?.message||"Failed to save credentials",variant:"destructive"})}finally{I(!1)}},Ke=n.trim(),Re=w.useMemo(()=>Ke?Sde(Ke)?"Path must be relative to the project root":null:"Path is required",[Ke]),Lt=w.useMemo(()=>e?Ke!==e.defaultWorktreePath||(e.authMode||"github")!==a:!1,[e,Ke,a]),At=!u&&!d&&Lt&&!Re,Ct=async()=>{if(At){h(!0);try{const Qe=await(await fetch(`${Ae}/api/v1/git/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({defaultWorktreePath:Ke,authMode:a})})).json();if(!Qe.success)throw new Error(Qe.error?.message||"Failed to update settings");const vt=Qe.data||{},Gt={defaultWorktreePath:vt.defaultWorktreePath||zu,authMode:vt.authMode||"github"};t(Gt),s(Gt.defaultWorktreePath),o(Gt.authMode),U({title:"Updated",description:"Git settings saved"})}catch(Xe){console.error("Failed to update git settings",Xe),U({title:"Error",description:Xe?.message||"Failed to update git settings",variant:"destructive"})}finally{h(!1)}}};return u&&!e?r.jsx("div",{children:"Loading..."}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"Git Settings"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Control how Coconut creates worktrees for change proposals and manual Git operations."})]}),r.jsx(or,{}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Remote Authentication"}),r.jsx(qt,{children:"Configure authentication for remote git operations."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{className:"text-sm font-medium",children:"Remote URL"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"The git remote URL for your repository (origin)."}),r.jsxs("div",{className:"flex items-center justify-between gap-3 rounded border bg-muted/30 px-3 py-2",children:[g&&!p?r.jsxs("span",{className:"text-sm text-muted-foreground italic flex items-center gap-2",children:[r.jsx(ta,{className:"h-3.5 w-3.5 animate-spin"}),"Loading..."]}):p?.remote?r.jsxs("a",{href:p.remote.replace(/\.git$/,"").replace(/^git@([^:]+):/,"https://$1/"),target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary hover:underline truncate inline-flex items-center gap-1.5",children:[p.remote,r.jsx(bp,{className:"h-3.5 w-3.5 shrink-0"})]}):r.jsx("span",{className:"text-sm text-muted-foreground italic",children:"Not configured"}),r.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[p?.remote&&r.jsx(re,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",onClick:()=>V(!0),disabled:Y,title:"Remove remote",children:r.jsx(Sn,{className:"h-4 w-4"})}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>{Q(p?.remote||""),B(!0)},children:p?.remote?"Edit":"Set Remote"})]})]})]}),r.jsx(or,{}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{className:"text-sm font-medium",children:"Authentication Mode"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"Choose how Coconut authenticates with your remote repository when pushing or pulling."}),r.jsxs(pC,{value:a,onValueChange:Xe=>o(Xe||"github"),className:"grid gap-2 md:grid-cols-2",children:[r.jsx("label",{htmlFor:"mode-github",className:`cursor-pointer rounded-md border p-3 transition-colors ${a==="github"?"border-primary ring-1 ring-primary/40 bg-primary/5":"border-border bg-background hover:border-primary/60"}`,children:r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(Yl,{value:"github",id:"mode-github",className:"mt-1 h-5 w-5 shrink-0 border-[1.5px]"}),r.jsxs("div",{className:"space-y-1 flex-1",children:[r.jsx("span",{className:"text-sm font-medium",children:"GitHub"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"Use the Coconut control plane to fetch short-lived GitHub tokens automatically."})]})]})}),r.jsx("label",{htmlFor:"mode-local",className:`cursor-pointer rounded-md border p-3 transition-colors ${a==="local"?"border-primary ring-1 ring-primary/40 bg-primary/5":"border-border bg-background hover:border-primary/60"}`,children:r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(Yl,{value:"local",id:"mode-local",className:"mt-1 h-5 w-5 shrink-0 border-[1.5px]"}),r.jsxs("div",{className:"space-y-1 flex-1",children:[r.jsx("span",{className:"text-sm font-medium",children:"Local configuration"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"Manage credentials yourself using SSH keys, stored PATs, or OS credential helpers on this Coconut."})]})]})})]})]}),a==="github"&&!p&&r.jsxs("div",{className:"flex items-center justify-center gap-2 py-4 text-sm text-muted-foreground",children:[r.jsx(ta,{className:"h-4 w-4 animate-spin"}),"Loading authentication status..."]}),a==="github"&&p&&!p.remote&&r.jsxs("div",{className:"rounded border border-amber-200 bg-amber-50 p-3 text-sm text-amber-700 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-200",children:[r.jsx("span",{className:"font-medium",children:"Remote URL required:"})," Set a remote URL above to enable GitHub authentication."]}),a==="github"&&p?.remote&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"space-y-3 rounded border p-3",children:[r.jsxs("div",{className:"flex items-start gap-3",children:[g?r.jsx(ta,{className:"h-5 w-5 mt-1 animate-spin text-muted-foreground"}):p?.authenticated?r.jsx(nm,{className:"h-5 w-5 mt-1 text-green-600"}):r.jsx(ey,{className:"h-5 w-5 mt-1 text-red-600"}),r.jsxs("div",{className:"space-y-1 flex-1",children:[r.jsx("div",{className:"font-medium",children:g?"Checking...":G?"Connected to GitHub":Z?"GitHub authorization required":p?.authenticated?"Authenticated":"Not authenticated"}),K&&r.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[r.jsxs("span",{className:"inline-flex items-center gap-1",children:[r.jsx(j2,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:G?"GitHub App credentials active":"Authorize with GitHub to continue"})]}),G&&ce&&r.jsxs("span",{className:"rounded bg-muted px-2 py-0.5 text-[11px] text-muted-foreground",children:["Expires ",ce]})]}),p?.error&&r.jsx("div",{className:"text-xs text-red-600",children:p.error})]})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-2 justify-end",children:[r.jsxs(re,{variant:"outline",size:"sm",onClick:ae,disabled:g,children:[r.jsx(ta,{className:"h-4 w-4 mr-2"+(g?" animate-spin":"")}),"Check Status"]}),G?r.jsx(re,{variant:"ghost",size:"sm",onClick:ne,disabled:L,children:L?"Disconnecting…":"Disconnect GitHub"}):r.jsxs(re,{size:"sm",onClick:le,disabled:R,children:[R?r.jsx(tn,{className:"h-4 w-4 mr-2 animate-spin"}):r.jsx(j2,{className:"h-4 w-4 mr-2"}),R?"Authorizing…":Z?"Reconnect GitHub":"Connect GitHub"]})]}),r.jsx("div",{className:"text-right",children:r.jsxs("a",{href:"https://app.coconut.dev/git",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-xs text-primary hover:underline",children:["Manage Github authentication",r.jsx(bp,{className:"h-3 w-3"})]})})]}),Z&&r.jsx("div",{className:"rounded border border-amber-200 bg-amber-50 p-3 text-xs text-amber-700 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-200",children:"GitHub authorization has expired. Click “Reconnect GitHub” to refresh access."}),C&&(C.helper||C.origin)&&r.jsxs("div",{className:"rounded border bg-muted/50 p-3",children:[r.jsx("div",{className:"text-xs font-medium mb-1",children:"Current Configuration"}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-1",children:[C.helper&&r.jsxs("div",{className:"flex gap-2",children:[r.jsx("span",{className:"font-mono",children:"credential.helper:"}),r.jsx("span",{className:"font-mono text-foreground",children:C.helper})]}),C.origin&&r.jsxs("div",{className:"flex gap-2",children:[r.jsx("span",{className:"font-mono",children:"Configured in:"}),r.jsx("span",{className:"font-mono text-foreground",children:C.origin})]})]})]})]}),a==="local"&&r.jsxs("div",{className:"rounded bg-muted p-4 space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("div",{className:"text-sm font-medium",children:"Setup Git Credentials"}),r.jsxs(re,{variant:"outline",size:"sm",onClick:()=>y(!0),children:[r.jsx(sm,{className:"h-4 w-4 mr-2"}),"Enter Credentials"]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground space-y-2",children:[r.jsx("p",{children:"Configure credentials directly on this Coconut. Coconut will use your existing SSH keys or credential helpers without contacting the control plane."}),r.jsxs("div",{className:"space-y-2 ml-2",children:[r.jsxs("div",{children:[r.jsx("div",{className:"font-semibold",children:"Option 1: SSH Keys (Recommended)"}),r.jsxs("code",{className:"text-[11px] block mt-1 bg-background rounded px-2 py-1",children:['ssh-keygen -t ed25519 -C "your_email@example.com"',r.jsx("br",{}),"# Add ~/.ssh/id_ed25519.pub to your Git provider account"]})]}),r.jsxs("div",{children:[r.jsx("div",{className:"font-semibold",children:"Option 2: Git Credential Manager"}),r.jsxs("code",{className:"text-[11px] block mt-1 bg-background rounded px-2 py-1",children:["# macOS (already configured with osxkeychain)",r.jsx("br",{}),"git credential-osxkeychain",r.jsx("br",{}),r.jsx("br",{}),"# Or install Git Credential Manager",r.jsx("br",{}),"brew install git-credential-manager"]})]}),r.jsxs("div",{children:[r.jsx("div",{className:"font-semibold",children:"Option 3: Personal Access Token"}),r.jsxs("code",{className:"text-[11px] block mt-1 bg-background rounded px-2 py-1",children:["# Store credentials after first push/pull",r.jsx("br",{}),"git config credential.helper store"]})]})]}),r.jsx("p",{className:"mt-3",children:'After configuring, click "Check Status" to verify authentication.'})]})]})]})]}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Worktree Location"}),r.jsx(qt,{children:"Choose where new worktrees should be created relative to your project root."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"default-worktree-path",children:"Default worktree path"}),r.jsx(Fe,{id:"default-worktree-path",value:n,onChange:Xe=>s(Xe.target.value),placeholder:"../worktrees",spellCheck:!1}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Paths are resolved from your project root. We recommend keeping worktrees outside the repository, for example ",r.jsx("code",{className:"rounded bg-muted px-1 py-0.5 text-[11px] font-mono",children:T0}),"."]}),Re&&r.jsx("p",{className:"text-xs text-red-600",children:Re})]}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsxs(re,{type:"button",variant:"outline",size:"sm",onClick:()=>s(T0),children:["Use ",T0]}),r.jsxs(re,{type:"button",variant:"ghost",size:"sm",onClick:()=>s(zu),children:["Reset to ",zu]})]})]})]}),r.jsxs("div",{className:"flex justify-end gap-2",children:[r.jsx(re,{type:"button",variant:"outline",disabled:d,onClick:W,children:"Reload"}),r.jsx(re,{type:"button",disabled:!At,onClick:Ct,children:d?"Saving...":"Save changes"})]}),r.jsx(fn,{open:b,onOpenChange:y,children:r.jsxs(ln,{children:[r.jsxs(nn,{children:[r.jsx(rn,{children:"Enter Git Credentials"}),r.jsx(_n,{children:"Enter your username and personal access token for HTTPS authentication. Your credentials will be securely stored using your system's credential manager."})]}),r.jsxs("div",{className:"space-y-4 py-4",children:[!p?.remote&&r.jsx("div",{className:"rounded border border-amber-200 bg-amber-50 p-3 text-xs text-amber-700 dark:border-amber-900 dark:bg-amber-950 dark:text-amber-200",children:"No remote URL configured. Set a remote URL first before entering credentials."}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"git-username",children:"Username"}),r.jsx(Fe,{id:"git-username",placeholder:"your-username",value:E,onChange:Xe=>_(Xe.target.value),autoComplete:"username"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"git-password",children:"Password / Personal Access Token"}),r.jsx(Fe,{id:"git-password",type:"password",placeholder:"ghp_xxxxxxxxxxxx or your password",value:N,onChange:Xe=>A(Xe.target.value),autoComplete:"current-password"}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["We recommend using a Personal Access Token instead of your password.",r.jsx("br",{}),"GitHub: Settings → Developer settings → Personal access tokens",r.jsx("br",{}),"GitLab: Preferences → Access Tokens"]})]})]}),r.jsxs(lr,{children:[r.jsx(re,{variant:"outline",onClick:()=>{y(!1),_(""),A("")},children:"Cancel"}),r.jsx(re,{onClick:Ge,disabled:k||!E||!N||!p?.remote,children:k?"Saving...":"Save Credentials"})]})]})}),r.jsx(fn,{open:O,onOpenChange:V,children:r.jsxs(ln,{children:[r.jsxs(nn,{children:[r.jsx(rn,{children:"Remove Remote?"}),r.jsx(_n,{children:"This will remove the origin remote from your local git configuration. The remote repository itself won't be affected."})]}),r.jsxs(lr,{children:[r.jsx(re,{variant:"outline",onClick:()=>V(!1),children:"Cancel"}),r.jsx(re,{variant:"destructive",onClick:async()=>{V(!1),await ye()},disabled:Y,children:Y?"Removing...":"Remove Remote"})]})]})}),r.jsx(fn,{open:H,onOpenChange:B,children:r.jsxs(ln,{children:[r.jsxs(nn,{children:[r.jsx(rn,{children:p?.remote?"Edit Remote URL":"Set Remote URL"}),r.jsx(_n,{children:"Configure the git remote URL for your repository. This is the origin remote used for push and pull operations."})]}),r.jsx("div",{className:"space-y-4 py-4",children:r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"remote-url",children:"Remote URL"}),r.jsx(Fe,{id:"remote-url",placeholder:"https://github.com/username/repo.git",value:z,onChange:Xe=>Q(Xe.target.value),autoComplete:"off"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"Enter your repository URL (HTTPS or SSH format)."})]})}),r.jsxs(lr,{children:[r.jsx(re,{variant:"outline",onClick:()=>{B(!1),Q("")},children:"Cancel"}),r.jsx(re,{onClick:pe,disabled:P||!z.trim(),children:P?"Saving...":"Save"})]})]})})]})}function TD(e){if(e){if(Array.isArray(e)){const t=e.map(n=>{if(typeof n=="string")return n.trim();if(typeof n=="number")return`${n}`}).filter(n=>typeof n=="string"&&n.length>0);return t.length>0?t:void 0}if(typeof e=="string"){const t=e.split(",").map(n=>n.trim()).filter(n=>n.length>0);return t.length>0?t:void 0}}}function AD(e,t){const n=e.name||t.name,s=t.description||e.description||"",a={registryId:e.id,registryEndpoint:e.endpoint,registrySource:hg,author:e.author||t.author};(t.version||e.version)&&(a.version=t.version||e.version);const o=TD(t.tags)||TD(e.tags);o&&(a.tags=o),t.capabilities&&Array.isArray(t.capabilities)&&(a.capabilities=t.capabilities),t.requirements&&typeof t.requirements=="object"&&(a.requirements=t.requirements),t.links&&typeof t.links=="object"&&(a.links=t.links),t.metadata&&typeof t.metadata=="object"&&(a.mcpMetadata=t.metadata);for(const[u,c]of Object.entries(a))c==null&&delete a[u];return{name:n,command:t.configuration.command,args:t.configuration.args,env:t.configuration.env,enabled:!0,description:s,metadata:Object.keys(a).length>0?a:void 0}}async function wde(e){const t=e.startsWith("http")?e:`https://registry.coconut.dev${e}`,n=await fetch(t,{headers:{Accept:"application/json","User-Agent":"coconut-frontend"}});if(!n.ok)throw new Error(`Failed to fetch MCP server detail: ${n.status}`);return n.json()}function Cde({open:e,onOpenChange:t,onImport:n}){return r.jsx(mC,{open:e,onOpenChange:t,categoryId:"mcp-servers",title:"Coconut Registry – MCP Servers",confirmLabel:"Add Server",getDetail:s=>wde(s.endpoint),renderPreview:(s,a)=>{if(!a)return r.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:"Select an MCP server to preview"});const o=AD(s,a),u=o.metadata??{},c=typeof u.version=="string"?u.version:void 0,d=Array.isArray(s.tags)?s.tags:[],h=Array.isArray(u.capabilities)?u.capabilities.filter(p=>typeof p=="string"):[];return r.jsx("div",{className:"h-full min-h-0 overflow-hidden rounded-md border",children:r.jsx(Ns,{className:"h-full",children:r.jsx("div",{className:"space-y-6 p-4",children:r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-semibold",children:s.name}),r.jsx("p",{className:"text-sm text-muted-foreground",children:a.description})]}),c&&r.jsxs(ut,{variant:"outline",children:["v",c]})]}),r.jsxs("div",{className:"text-xs text-muted-foreground",children:["Registry ID: ",r.jsx("span",{className:"font-mono",children:s.id})]}),d.length>0&&r.jsx("div",{className:"flex flex-wrap gap-2",children:d.map(p=>r.jsx(ut,{variant:"secondary",children:p},p))}),r.jsxs("div",{className:"space-y-2 rounded-md border p-3 bg-muted/50",children:[r.jsx("div",{className:"text-sm font-medium",children:"Configuration"}),r.jsxs("div",{className:"space-y-1 text-sm font-mono",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground",children:"Command:"})," ",r.jsx("span",{className:"text-foreground",children:o.command})]}),o.args&&o.args.length>0&&r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground",children:"Args:"})," ",r.jsx("span",{className:"text-foreground",children:o.args.join(" ")})]}),o.env&&Object.keys(o.env).length>0&&r.jsxs("div",{children:[r.jsx("span",{className:"text-muted-foreground",children:"Env:"})," ",r.jsx("span",{className:"text-foreground",children:JSON.stringify(o.env)})]})]})]}),h.length>0&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"text-sm font-medium",children:"Capabilities"}),r.jsx("ul",{className:"list-disc pl-5 text-sm text-muted-foreground space-y-1",children:h.map(p=>r.jsx("li",{children:p},p))})]}),a.documentation&&r.jsxs("div",{className:"space-y-3",children:[a.documentation.overview&&r.jsxs("div",{children:[r.jsx("div",{className:"text-sm font-medium mb-2",children:"Overview"}),r.jsx(Xr,{className:"[&_.prose]:max-w-none text-sm",children:a.documentation.overview})]}),a.documentation.installation&&r.jsxs("div",{children:[r.jsx("div",{className:"text-sm font-medium mb-2",children:"Installation"}),r.jsx(Xr,{className:"[&_.prose]:max-w-none text-sm",children:a.documentation.installation})]}),a.documentation.usage&&r.jsxs("div",{children:[r.jsx("div",{className:"text-sm font-medium mb-2",children:"Usage"}),r.jsx(Xr,{className:"[&_.prose]:max-w-none text-sm",children:a.documentation.usage})]}),a.documentation.examples&&r.jsxs("div",{children:[r.jsx("div",{className:"text-sm font-medium mb-2",children:"Examples"}),r.jsx(Xr,{className:"[&_.prose]:max-w-none text-sm",children:a.documentation.examples})]})]})]})})})})},onConfirm:async(s,a)=>{const o=AD(s,a);await n({summary:s,detail:a,payload:o})}})}function Nde(){const[e,t]=w.useState({}),[n,s]=w.useState(!0),[a,o]=w.useState(!1),[u,c]=w.useState({name:"",command:"",args:"",env:"",description:"",enabled:!0}),[d,h]=w.useState(!1),[p,m]=w.useState(null),[g,v]=w.useState({name:"",command:"",args:"",env:"",description:"",enabled:!0}),[C,S]=w.useState(!1);w.useEffect(()=>{b()},[]);const b=async()=>{try{s(!0);const $=await Tn("/api/v1/mcp/raw-config");t($||{})}catch($){console.error("Failed to load MCP config:",$),Et({title:"Error",description:"Failed to load MCP configuration",variant:"destructive"})}finally{s(!1)}},y=async $=>{try{o(!0),await Tn("/api/v1/mcp/raw-config",{method:"PUT",body:JSON.stringify($)}),t($),Et({title:"Success",description:"MCP configuration saved successfully"})}catch(H){console.error("Failed to save MCP config:",H),Et({title:"Error",description:"Failed to save MCP configuration",variant:"destructive"})}finally{o(!1)}},E=()=>{if(!u.name||!u.command){Et({title:"Error",description:"Server name and command are required",variant:"destructive"});return}const $={name:u.name,command:u.command,enabled:u.enabled,description:u.description||void 0};if(u.args.trim()&&($.args=u.args.split(" ").filter(B=>B.trim())),u.env.trim())try{$.env=JSON.parse(u.env)}catch{Et({title:"Error",description:"Invalid JSON format for environment variables",variant:"destructive"});return}const H={...e,mcpServers:{...e.mcpServers,[u.name]:$}};y(H),c({name:"",command:"",args:"",env:"",description:"",enabled:!0}),h(!1)},_=($,H)=>{const B={...e,mcpServers:{...e.mcpServers,[$]:{...e.mcpServers[$],enabled:H}}};y(B)},N=$=>{const{[$]:H,...B}=e.mcpServers||{},z={...e,mcpServers:B};y(z)},A=$=>{const H=e.mcpServers?.[$];H&&(v({name:H.name||$,command:H.command,args:H.args?.join(" ")||"",env:H.env?JSON.stringify(H.env,null,2):"",description:H.description||"",enabled:H.enabled!==!1}),m($))},k=$=>{if(!g.command){Et({title:"Error",description:"Command is required",variant:"destructive"});return}const H={name:g.name,command:g.command,enabled:g.enabled,description:g.description||void 0};if(g.args.trim()&&(H.args=g.args.split(" ").filter(P=>P.trim())),g.env.trim())try{H.env=JSON.parse(g.env)}catch{Et({title:"Error",description:"Invalid JSON format for environment variables",variant:"destructive"});return}const{[$]:B,...z}=e.mcpServers||{},Q={...e,mcpServers:{...z,[$]:H}};y(Q),m(null)},I=()=>{m(null),v({name:"",command:"",args:"",env:"",description:"",enabled:!0})},R=$=>{const H={...e,globalSettings:{...e.globalSettings,...$}};y(H)},M=async $=>{const{payload:H}=$;let B=H.name.toLowerCase().replace(/\s+/g,"-");const z=e.mcpServers||{};let Q=B,P=1;for(;z[Q];)Q=`${B}-${P}`,P++;const X={name:Q,command:H.command,args:H.args,env:H.env,enabled:H.enabled!==!1,description:H.description},Y={...e,mcpServers:{...e.mcpServers,[Q]:X}};await y(Y),Et({title:"Success",description:`MCP server "${Q}" added from registry`})};if(n)return r.jsx("div",{className:"space-y-6",children:r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"MCP Settings"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading configuration..."})]})});const L=e.mcpServers||{};return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"MCP Settings"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure Model Context Protocol servers and settings."})]}),r.jsx(or,{}),Object.keys(L).length===0&&!d&&r.jsxs(xo,{children:[r.jsx(Ii,{className:"h-4 w-4"}),r.jsx(vo,{children:"No MCP servers configured yet. Add your first server to get started."})]}),r.jsxs(Ie,{children:[r.jsx(nt,{children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsxs(st,{className:"flex items-center gap-2",children:[r.jsx(HI,{className:"h-5 w-5"}),"MCP Servers"]}),r.jsx(qt,{children:"Configure and manage Model Context Protocol servers for enhanced AI capabilities."})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs(re,{size:"sm",variant:"outline",onClick:()=>S(!0),children:[r.jsx(hd,{className:"h-4 w-4 mr-2"}),"Registry"]}),r.jsxs(re,{size:"sm",onClick:()=>h(!d),variant:d?"outline":"default",children:[r.jsx(mn,{className:"h-4 w-4 mr-2"}),d?"Cancel":"Add Server"]})]})]})}),r.jsxs(Be,{children:[d&&r.jsxs("div",{className:"space-y-4 p-4 border rounded-lg mb-4",children:[r.jsx("h4",{className:"font-medium",children:"Add MCP Server"}),r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"serverName",children:"Server Name"}),r.jsx(Fe,{id:"serverName",value:u.name,onChange:$=>c({...u,name:$.target.value}),placeholder:"e.g., filesystem-server"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"serverCommand",children:"Command"}),r.jsx(Fe,{id:"serverCommand",value:u.command,onChange:$=>c({...u,command:$.target.value}),placeholder:"e.g., npx @modelcontextprotocol/server-filesystem"})]})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"serverArgs",children:"Arguments (space-separated)"}),r.jsx(Fe,{id:"serverArgs",value:u.args,onChange:$=>c({...u,args:$.target.value}),placeholder:"e.g., /path/to/allowed/directory"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"serverEnv",children:"Environment Variables (JSON format)"}),r.jsx(ar,{id:"serverEnv",value:u.env,onChange:$=>c({...u,env:$.target.value}),placeholder:'{"KEY": "value", "ANOTHER_KEY": "another_value"}',rows:3})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"serverDescription",children:"Description (optional)"}),r.jsx(Fe,{id:"serverDescription",value:u.description,onChange:$=>c({...u,description:$.target.value}),placeholder:"Brief description of what this server provides"})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Fa,{id:"serverEnabled",checked:u.enabled,onCheckedChange:$=>c({...u,enabled:$})}),r.jsx(be,{htmlFor:"serverEnabled",children:"Enable server"})]}),r.jsxs("div",{className:"flex space-x-2",children:[r.jsxs(re,{onClick:E,disabled:a,children:[r.jsx(mn,{className:"h-4 w-4 mr-2"}),"Add Server"]}),r.jsx(re,{variant:"outline",onClick:()=>h(!1),children:"Cancel"})]})]}),r.jsx("div",{className:"space-y-4",children:Object.entries(L).map(([$,H])=>{const B=H.enabled!==!1,z=H.name||$,Q=p===$;return r.jsx("div",{className:"border rounded-lg",children:Q?r.jsxs("div",{className:"space-y-4 p-4",children:[r.jsx("h4",{className:"font-medium",children:"Edit MCP Server"}),r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:`edit-name-${$}`,children:"Server Name"}),r.jsx(Fe,{id:`edit-name-${$}`,value:g.name,onChange:P=>v({...g,name:P.target.value}),placeholder:"e.g., filesystem-server"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:`edit-command-${$}`,children:"Command"}),r.jsx(Fe,{id:`edit-command-${$}`,value:g.command,onChange:P=>v({...g,command:P.target.value}),placeholder:"e.g., npx @modelcontextprotocol/server-filesystem"})]})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:`edit-args-${$}`,children:"Arguments (space-separated)"}),r.jsx(Fe,{id:`edit-args-${$}`,value:g.args,onChange:P=>v({...g,args:P.target.value}),placeholder:"e.g., /path/to/allowed/directory"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:`edit-env-${$}`,children:"Environment Variables (JSON format)"}),r.jsx(ar,{id:`edit-env-${$}`,value:g.env,onChange:P=>v({...g,env:P.target.value}),placeholder:'{"KEY": "value", "ANOTHER_KEY": "another_value"}',rows:3})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:`edit-description-${$}`,children:"Description (optional)"}),r.jsx(Fe,{id:`edit-description-${$}`,value:g.description,onChange:P=>v({...g,description:P.target.value}),placeholder:"Brief description of what this server provides"})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Fa,{id:`edit-enabled-${$}`,checked:g.enabled,onCheckedChange:P=>v({...g,enabled:P})}),r.jsx(be,{htmlFor:`edit-enabled-${$}`,children:"Enable server"})]}),r.jsxs("div",{className:"flex space-x-2",children:[r.jsx(re,{onClick:()=>k($),disabled:a,children:"Save Changes"}),r.jsx(re,{variant:"outline",onClick:I,children:"Cancel"})]})]}):r.jsxs("div",{className:"flex items-center justify-between p-4",children:[r.jsxs("div",{className:"flex items-center space-x-4",children:[B?r.jsx(tm,{className:"h-4 w-4 text-green-500 shrink-0"}):r.jsx(Ii,{className:"h-4 w-4 text-gray-400 shrink-0"}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("h4",{className:"font-medium",children:z}),r.jsx(ut,{variant:B?"default":"secondary",children:B?"Enabled":"Disabled"})]}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:H.description||H.command}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Command: ",H.command," ",H.args?.join(" ")]})]})]}),r.jsxs("div",{className:"flex items-center space-x-2 shrink-0",children:[r.jsx(Fa,{checked:B,onCheckedChange:P=>_($,P),disabled:a}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>A($),children:r.jsx(Qa,{className:"h-4 w-4"})}),r.jsx(re,{variant:"outline",size:"sm",onClick:()=>N($),disabled:a,children:r.jsx(Sn,{className:"h-4 w-4"})})]})]})},$)})})]})]}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsxs(st,{className:"flex items-center gap-2",children:[r.jsx(Nr,{className:"h-5 w-5"}),"Configuration File"]}),r.jsxs(qt,{children:["The MCP configuration is stored in ",r.jsx("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:".nut/mcp/config.json"})]})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"configJson",children:"Current Configuration (JSON)"}),r.jsx(ar,{id:"configJson",value:JSON.stringify(e,null,2),readOnly:!0,rows:12,className:"font-mono text-sm",placeholder:"Loading configuration..."}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"This is a read-only view of the current configuration. Use the forms above to make changes."})]}),r.jsxs(xo,{children:[r.jsx(Ii,{className:"h-4 w-4"}),r.jsx(vo,{children:"Configuration changes are automatically saved to the MCP config file. This file can also be edited manually if you prefer working with JSON directly."})]})]})]}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsxs(st,{className:"flex items-center gap-2",children:[r.jsx(Xl,{className:"h-5 w-5"}),"Global Settings"]}),r.jsx(qt,{children:"Configure global MCP behavior and connection settings."})]}),r.jsx(Be,{className:"space-y-4",children:r.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"timeout",children:"Connection Timeout (ms)"}),r.jsx(Fe,{id:"timeout",type:"number",value:e.globalSettings?.timeout||3e4,onChange:$=>R({timeout:parseInt($.target.value)}),placeholder:"30000"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"retryAttempts",children:"Retry Attempts"}),r.jsx(Fe,{id:"retryAttempts",type:"number",value:e.globalSettings?.retryAttempts||3,onChange:$=>R({retryAttempts:parseInt($.target.value)}),placeholder:"3"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"logLevel",children:"Log Level"}),r.jsxs("select",{id:"logLevel",className:"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",value:e.globalSettings?.logLevel||"info",onChange:$=>R({logLevel:$.target.value}),children:[r.jsx("option",{value:"debug",children:"Debug"}),r.jsx("option",{value:"info",children:"Info"}),r.jsx("option",{value:"warn",children:"Warning"}),r.jsx("option",{value:"error",children:"Error"})]})]})]})})]}),r.jsx("div",{className:"flex justify-end space-x-2",children:r.jsx(re,{variant:"outline",onClick:b,disabled:n,children:"Reload Configuration"})}),r.jsx(Cde,{open:C,onOpenChange:S,onImport:M})]})}function Tde(){const e=[{id:"1",name:"Code Review Assistant",description:"Prompt for AI agents to perform thorough code reviews",category:"Code Review",usage:"cursor-cli, claude-code",lastUpdated:"2 days ago",active:!0},{id:"2",name:"Architecture Advisor",description:"System prompt for architectural decision guidance",category:"Architecture",usage:"gemini-cli, claude-code",lastUpdated:"1 week ago",active:!0},{id:"3",name:"Bug Analysis Expert",description:"Specialized prompt for debugging and error analysis",category:"Debugging",usage:"cursor-cli",lastUpdated:"3 days ago",active:!1},{id:"4",name:"Documentation Generator",description:"Prompt for generating comprehensive code documentation",category:"Documentation",usage:"github-copilot, claude-code",lastUpdated:"5 days ago",active:!0}],t=["Code Review","Architecture","Debugging","Documentation","Testing","Refactoring","Security","Performance"];return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"System Prompts"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage system prompts used by AI agents and integrations for consistent behavior."})]}),r.jsx(or,{}),r.jsxs(Ie,{children:[r.jsx(nt,{children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx(st,{children:"Prompt Library"}),r.jsx(qt,{children:"Pre-configured prompts for different AI agents and use cases."})]}),r.jsxs(re,{size:"sm",children:[r.jsx(mn,{className:"h-4 w-4 mr-2"}),"New Prompt"]})]})}),r.jsx(Be,{children:r.jsx("div",{className:"space-y-4",children:e.map(n=>r.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("h4",{className:"font-medium",children:n.name}),r.jsx(ut,{variant:n.active?"default":"secondary",children:n.active?"Active":"Inactive"}),r.jsx(ut,{variant:"outline",children:n.category})]}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:n.description}),r.jsxs("div",{className:"flex items-center space-x-4 mt-2",children:[r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Used by: ",n.usage]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Updated: ",n.lastUpdated]})]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(re,{variant:"outline",size:"sm",children:r.jsx(q9,{className:"h-4 w-4"})}),r.jsx(re,{variant:"outline",size:"sm",children:r.jsx(Qa,{className:"h-4 w-4"})}),r.jsx(re,{variant:"outline",size:"sm",children:r.jsx(la,{className:"h-4 w-4"})}),r.jsx(re,{variant:"outline",size:"sm",children:r.jsx(Sn,{className:"h-4 w-4"})})]})]},n.id))})})]}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Create New Prompt"}),r.jsx(qt,{children:"Design a new system prompt for your AI agents and integrations."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"promptName",children:"Prompt Name"}),r.jsx(Fe,{id:"promptName",placeholder:"Enter prompt name"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"promptCategory",children:"Category"}),r.jsxs(Zt,{children:[r.jsx(Wt,{children:r.jsx(Qt,{placeholder:"Select category"})}),r.jsx(Vt,{children:t.map(n=>r.jsx(Le,{value:n.toLowerCase(),children:n},n))})]})]})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"promptDescription",children:"Description"}),r.jsx(Fe,{id:"promptDescription",placeholder:"Brief description of the prompt's purpose"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"targetIntegrations",children:"Target Integrations"}),r.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:["cursor-cli","claude-code","gemini-cli","github-copilot"].map(n=>r.jsxs("label",{className:"flex items-center space-x-2",children:[r.jsx("input",{type:"checkbox",className:"rounded"}),r.jsx("span",{className:"text-sm",children:n})]},n))})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"promptContent",children:"Prompt Content"}),r.jsx("textarea",{id:"promptContent",className:"w-full min-h-[200px] p-3 border rounded-md font-mono text-sm",placeholder:"You are an expert code reviewer. Your task is to..."})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"promptVariables",children:"Variables (JSON format)"}),r.jsx("textarea",{id:"promptVariables",className:"w-full min-h-[100px] p-3 border rounded-md font-mono text-sm",placeholder:'{"language": "typescript", "framework": "react", "style": "functional"}'})]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx(re,{variant:"outline",children:"Preview"}),r.jsx(re,{variant:"outline",children:"Save as Draft"}),r.jsx(re,{children:"Save & Activate"})]})]})]}),r.jsxs(Ie,{children:[r.jsxs(nt,{children:[r.jsx(st,{children:"Prompt Templates"}),r.jsx(qt,{children:"Import and export prompt templates for sharing across teams."})]}),r.jsxs(Be,{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxs(re,{variant:"outline",size:"sm",children:[r.jsx(ud,{className:"h-4 w-4 mr-2"}),"Import Template"]}),r.jsx(re,{variant:"outline",size:"sm",children:"Export All Prompts"}),r.jsx(re,{variant:"outline",size:"sm",children:"Export Selected"})]}),r.jsx("div",{className:"p-4 border-2 border-dashed rounded-lg text-center",children:r.jsx("p",{className:"text-sm text-muted-foreground",children:"Drag and drop prompt template files here, or click to browse"})})]})]})]})}function Ade(){const[e,t]=w.useState([]),[n,s]=w.useState(!1),[a,o]=w.useState(null),[u,c]=w.useState(!1),[d,h]=w.useState(null),[p,m]=w.useState({name:"",description:"",linkPath:"",targetPath:"",isActive:!1}),[g,v]=w.useState({name:"",description:"",linkPath:"",targetPath:"",isActive:!1});w.useEffect(()=>{C()},[]);const C=async()=>{try{const k=await(await fetch(`${Ae}/api/v1/symlinks`)).json();k.success&&t(k.symlinks)}catch(A){console.error("Error fetching symlinks:",A)}},S=async A=>{o(A);try{(await fetch(`${Ae}/api/v1/symlinks/${A}/toggle`,{method:"POST",headers:{"Content-Type":"application/json"}})).ok?await C():console.error("Error toggling symlink")}catch(k){console.error("Error toggling symlink:",k)}finally{o(null)}},b=async A=>{if(confirm("Are you sure you want to delete this symlink configuration?")){o(A);try{(await fetch(`${Ae}/api/v1/symlinks/${A}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})).ok?await C():console.error("Error deleting symlink")}catch(k){console.error("Error deleting symlink:",k)}finally{o(null)}}},y=async()=>{if(!p.name||!p.linkPath||!p.targetPath){alert("Please fill in all required fields");return}s(!0);try{const A=await fetch(`${Ae}/api/v1/symlinks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)});if(A.ok)await C(),c(!1),m({name:"",description:"",linkPath:"",targetPath:"",isActive:!1});else{const k=await A.json();alert(k.error?.message||"Error creating symlink")}}catch(A){console.error("Error adding symlink:",A),alert("Failed to create symlink")}finally{s(!1)}},E=A=>{h(A.id),v({name:A.name,description:A.description||"",linkPath:A.linkPath,targetPath:A.targetPath,isActive:A.isActive})},_=()=>{h(null),v({name:"",description:"",linkPath:"",targetPath:"",isActive:!1})},N=async()=>{if(d){if(!g.name||!g.linkPath||!g.targetPath){alert("Please fill in all required fields");return}o(d);try{const A=await fetch(`${Ae}/api/v1/symlinks/${d}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)});if(A.ok)await C(),_();else{const k=await A.json();alert(k.error?.message||"Error updating symlink")}}catch(A){console.error("Error updating symlink:",A),alert("Failed to update symlink")}finally{o(null)}}};return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium",children:"Symlinks Configuration"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage symlinks for easy access to project rules and configurations."})]}),r.jsx(or,{}),r.jsxs(Ie,{children:[r.jsx(nt,{children:r.jsx("div",{className:"flex items-center justify-between",children:r.jsxs(re,{size:"sm",variant:"outline",onClick:()=>c(!u),children:[r.jsx(mn,{className:"h-4 w-4 mr-2"}),u?"Cancel":"Add Symlink"]})})}),r.jsxs(Be,{children:[u&&r.jsxs("div",{className:"mb-6 p-4 border rounded-lg bg-muted/50",children:[r.jsx("h4",{className:"font-medium mb-4",children:"New Symlink Configuration"}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:"new-name",children:"Name *"}),r.jsx(Fe,{id:"new-name",placeholder:"e.g., Claude Rules",value:p.name,onChange:A=>m({...p,name:A.target.value})})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"new-description",children:"Description"}),r.jsx(Fe,{id:"new-description",placeholder:"e.g., Project-specific rules for Claude AI",value:p.description,onChange:A=>m({...p,description:A.target.value})})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"new-link-path",children:"Link Path * (relative to project root)"}),r.jsx(Fe,{id:"new-link-path",placeholder:"e.g., CLAUDE.md or docs/README.md",value:p.linkPath,onChange:A=>m({...p,linkPath:A.target.value})}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Where the symlink will be created in your project"})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:"new-target-path",children:"Target Path * (relative to project root)"}),r.jsx(Fe,{id:"new-target-path",placeholder:"e.g., .nut/rules/CLAUDE.md",value:p.targetPath,onChange:A=>m({...p,targetPath:A.target.value})}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"The actual file that the symlink will point to"})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("input",{type:"checkbox",id:"new-active",checked:p.isActive,onChange:A=>m({...p,isActive:A.target.checked}),className:"rounded"}),r.jsx(be,{htmlFor:"new-active",children:"Activate immediately"})]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx(re,{variant:"outline",onClick:()=>{c(!1),m({name:"",description:"",linkPath:"",targetPath:"",isActive:!1})},children:"Cancel"}),r.jsx(re,{onClick:y,disabled:n,children:n?"Creating...":"Create Symlink"})]})]})]}),e.length===0&&!u?r.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[r.jsx(P2,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),r.jsx("p",{children:"No symlinks configured"}),r.jsx("p",{className:"text-sm mt-2",children:'Click "Add Symlink" to create your first symlink configuration.'})]}):r.jsx("div",{className:"space-y-4",children:e.map(A=>r.jsx("div",{className:"border rounded-lg",children:d===A.id?r.jsxs("div",{className:"p-4 space-y-4",children:[r.jsxs("div",{children:[r.jsx(be,{htmlFor:`edit-name-${A.id}`,children:"Name *"}),r.jsx(Fe,{id:`edit-name-${A.id}`,value:g.name,onChange:k=>v({...g,name:k.target.value})})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:`edit-desc-${A.id}`,children:"Description"}),r.jsx(Fe,{id:`edit-desc-${A.id}`,value:g.description,onChange:k=>v({...g,description:k.target.value})})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:`edit-link-${A.id}`,children:"Link Path *"}),r.jsx(Fe,{id:`edit-link-${A.id}`,value:g.linkPath,onChange:k=>v({...g,linkPath:k.target.value})})]}),r.jsxs("div",{children:[r.jsx(be,{htmlFor:`edit-target-${A.id}`,children:"Target Path *"}),r.jsx(Fe,{id:`edit-target-${A.id}`,value:g.targetPath,onChange:k=>v({...g,targetPath:k.target.value})})]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx(re,{variant:"outline",size:"sm",onClick:_,children:"Cancel"}),r.jsx(re,{size:"sm",onClick:N,disabled:a===A.id,children:a===A.id?"Saving...":"Save"})]})]}):r.jsxs("div",{className:"flex items-center justify-between p-4",children:[r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[A.isActive?r.jsx(RU,{className:"h-4 w-4 text-green-600"}):r.jsx(P2,{className:"h-4 w-4 text-gray-400"}),r.jsx("h4",{className:"font-medium",children:A.name})]}),r.jsx(ut,{variant:A.isActive?"default":"secondary",children:A.isActive?"Active":"Inactive"})]}),A.description&&r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:A.description}),r.jsxs("div",{className:"text-xs text-muted-foreground mt-2 font-mono",children:[A.linkPath," → ",A.targetPath]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(re,{onClick:()=>S(A.id),disabled:a===A.id,variant:A.isActive?"outline":"default",size:"sm",children:a===A.id?"...":A.isActive?"Disable":"Enable"}),r.jsx(re,{onClick:()=>E(A),variant:"outline",size:"sm",disabled:a===A.id,children:r.jsx(YU,{className:"h-4 w-4"})}),r.jsx(re,{onClick:()=>b(A.id),variant:"outline",size:"sm",disabled:a===A.id,children:r.jsx(Sn,{className:"h-4 w-4"})})]})]})},A.id))})]})]})]})}let jl;async function kde(){if(jl!==void 0)return jl;try{const e=await fetch(`${Ae}/api/v1/config`);if(!e.ok)return jl=null,null;const n=(await e.json())?.data||{},s=n?.coconut?.id||n?.cloud?.coconutId||n?.cloud?.coconut_id;return jl=typeof s=="string"&&s.trim()?s.trim():null,jl}catch(e){return console.error("[github-token] Failed to load Coconut ID",e),jl=null,null}}async function Rde(e){const t=await fetch(`${t7}/api/v1/git/token`,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({coconutId:e})});if(!t.ok){let o="Failed to request GitHub token from control plane";if(t.status===401||t.status===403)throw new Error("Please sign in to app.coconut.dev and then retry the action.");try{const u=await t.json();o=u?.error?.message||u?.message||o}catch{}throw new Error(o)}const n=await t.json(),s=n?.token||n?.data?.token,a=n?.expiresAt||n?.data?.expiresAt;if(!s||!a)throw new Error("Control plane response missing token or expiresAt");return{token:s,expiresAt:a}}async function Dde(e,t){const n=await fetch(`${Ae}/api/v1/git/providers/github/token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:e,expiresAt:t})}),s=await n.json().catch(()=>({}));if(!n.ok||!s?.success){const a=s?.error?.message||"Failed to store GitHub token on Coconut";throw new Error(a)}}async function Ide(){const e=await kde();if(!e)throw new Error("Coconut ID not configured. Reconnect via Settings → Git.");const{token:t,expiresAt:n}=await Rde(e);return await Dde(t,n),{tokenFetched:!0,message:n}}function jde(){const[e,t]=w.useState(!0),[n,s]=w.useState(null),[a,o]=w.useState([]),[u,c]=w.useState([]),[d,h]=w.useState(""),[p,m]=w.useState(""),[g,v]=w.useState("main"),[C,S]=w.useState(null),{toast:b}=bn(),{refresh:y}=Kp(),[E,_]=w.useState(!1),[N,A]=w.useState(!1),[k,I]=w.useState(null),[R,M]=w.useState(null),[L,$]=w.useState(null),[H,B]=w.useState(null),[z,Q]=w.useState(null),[P,X]=w.useState(null),[Y,F]=w.useState("merge"),[O,V]=w.useState("merge"),[te,U]=w.useState("../worktrees"),[W,ae]=w.useState("github"),[se,K]=w.useState(null),[G,Z]=w.useState(!1),[ce,le]=w.useState(!1),[ne,pe]=w.useState(""),[ye,Ge]=w.useState(""),[Ke,Re]=w.useState(!1),[Lt,At]=w.useState(""),[Ct,Xe]=w.useState(!1),[Qe,vt]=w.useState(new Set),[Gt,ke]=w.useState(!1),[he,we]=w.useState(!1),[He,Je]=w.useState(!1),[dt,Yt]=w.useState(null),[pt,cn]=w.useState(null),jn=w.useCallback(async()=>{if(W!=="github"||se?.provider!=="github")return!0;if(se?.authenticated&&se?.expiresAt){const Ye=new Date(se.expiresAt).getTime(),at=Date.now(),sn=300*1e3;if(Ye>at+sn)return!0}const me=b({title:"Fetching GitHub token",description:"Contacting control plane…"});try{const{message:Ye}=await Ide();return b({title:"GitHub token ready",description:Ye?`Valid until ${new Date(Ye).toLocaleString()}`:"Token fetched successfully."}),K(at=>({...at,authenticated:!0,error:void 0,expiresAt:Ye??at?.expiresAt,provider:"github"})),!0}catch(Ye){const at=Ye?.message?`${Ye.message} Visit Settings → Git to reconnect.`:"Visit Settings → Git to connect GitHub.";return b({title:"GitHub token unavailable",description:at,variant:"destructive"}),S(Ye?.message||"GitHub authorization required. Visit Settings → Git to reconnect."),!1}finally{me?.dismiss?.()}},[W,se?.provider,se?.authenticated,se?.expiresAt,b]),je=async()=>{t(!0),S(null);try{const[me,Ye,at,sn,Un]=await Promise.all([fetch(`${Ae}/api/v1/git/status`).then(Jn=>Jn.json()),fetch(`${Ae}/api/v1/git/branches`).then(Jn=>Jn.json()),fetch(`${Ae}/api/v1/git/worktrees`).then(Jn=>Jn.json()),fetch(`${Ae}/api/v1/git/settings`).then(Jn=>Jn.json()).catch(()=>null),fetch(`${Ae}/api/v1/git/auth-status`).then(Jn=>Jn.json()).catch(()=>null)]);me.success&&s(me.data),Ye.success&&o(Ye.data),at.success&&c(at.data),sn&&sn.success&&sn.data?.defaultWorktreePath&&(U(sn.data.defaultWorktreePath),sn.data.authMode&&ae(sn.data.authMode)),Un&&Un.success&&K(Un.data)}catch(me){S(me.message),b({title:"Failed to refresh",description:me.message,variant:"destructive"})}finally{t(!1)}};w.useEffect(()=>{je()},[]);const et=w.useMemo(()=>{const me=n?.branch?.toLowerCase();return me==="main"||me==="master"},[n?.branch]),wt=w.useMemo(()=>{const me=!!Lt.trim(),Ye=Qe.size>0;return me&&Ye},[Lt,Qe]),gt=me=>me==="??"||me.includes("U")?"U":me.includes("R")?"R":me.includes("C")?"C":me.includes("D")?"D":me.includes("A")?"A":me.includes("M")?"M":me||"?",On=(me,Ye)=>{vt(at=>{const sn=new Set(at);return Ye?sn.add(me):sn.delete(me),sn})},Rr=()=>{n?.changes&&vt(new Set(n.changes.map(me=>me.path)))},Sr=()=>{vt(new Set)},Wn=()=>{n?.changes&&(n.changes.every(Ye=>Qe.has(Ye.path))?Sr():Rr())},Qn=w.useMemo(()=>!n?.changes||n.changes.length===0?!1:n.changes.every(me=>Qe.has(me.path)),[n?.changes,Qe]),qs=me=>{Yt(me),Je(!0)},wn=async()=>{if(dt){cn(dt),S(null);try{const me=await fetch(`${Ae}/api/v1/git/discard`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({file:dt})}).then(Ye=>Ye.json());if(!me.success)throw new Error(me.error?.message||"Failed to discard file");vt(Ye=>{const at=new Set(Ye);return at.delete(dt),at}),b({title:"File discarded",description:dt}),Je(!1),Yt(null),await je(),await y()}catch(me){S(me.message),b({title:"Discard failed",description:me.message,variant:"destructive"})}finally{cn(null)}}},dr=async()=>{if(d.trim()){_(!0),S(null);try{const me=await fetch(`${Ae}/api/v1/git/worktrees`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({branch:d,from:"main"})}).then(Ye=>Ye.json());if(!me.success)throw new Error(me.error?.message||"Failed to create worktree");h(""),await je(),b({title:"Worktree created",description:me.data?.added?.branch})}catch(me){S(me.message),b({title:"Create failed",description:me.message,variant:"destructive"})}_(!1)}},Se=async me=>{if(S(null),!(W==="github"&&se?.provider==="github"&&!await jn())){try{I(me||"");const Ye=me?`/api/v1/git/worktrees/${encodeURIComponent(me)}/push`:"/api/v1/git/push",at=await fetch(`${Ae}${Ye}`,{method:"POST"}).then(sn=>sn.json());if(!at.success)throw new Error(at.error?.message||"Push failed");b({title:"Pushed",description:me?`Worktree ${me}`:"Current branch"}),await je()}catch(Ye){const at=Ye.message||"",sn=at.includes("Authentication")||at.includes("could not read Username")||at.includes("could not read Password")||at.includes("terminal prompts disabled");S(at),b({title:"Push failed",description:at,variant:"destructive"}),sn&&Z(!0)}I(null)}},Pe=async me=>{if(S(null),!(W==="github"&&se?.provider==="github"&&!await jn())){try{M(me||"");const Ye=me?`/api/v1/git/worktrees/${encodeURIComponent(me)}/pull`:"/api/v1/git/pull",at=await fetch(`${Ae}${Ye}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({strategy:O})}).then(sn=>sn.json());if(!at.success)throw new Error(at.error?.message||"Pull failed");await je(),b({title:"Pulled",description:`${me?`Worktree ${me}`:"Current branch"} (${O})`})}catch(Ye){const at=Ye.message||"",sn=at.includes("Authentication")||at.includes("could not read Username")||at.includes("could not read Password")||at.includes("terminal prompts disabled");S(at),b({title:"Pull failed",description:at,variant:"destructive"}),sn&&Z(!0)}M(null)}},Ze=async me=>{if(confirm(`Remove worktree ${me}?`)){S(null);try{$(me);const Ye=await fetch(`${Ae}/api/v1/git/worktrees/${encodeURIComponent(me)}`,{method:"DELETE"}).then(at=>at.json());if(!Ye.success)throw new Error(Ye.error?.message||"Failed to remove worktree");await je(),b({title:"Worktree removed",description:me})}catch(Ye){S(Ye.message),b({title:"Remove failed",description:Ye.message,variant:"destructive"})}$(Ye=>Ye===me?null:Ye)}},rt=async()=>{if(!ne||!ye){b({title:"Error",description:"Username and password are required",variant:"destructive"});return}Re(!0);try{const Ye=await(await fetch(`${Ae}/api/v1/git/credentials`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:ne,password:ye})})).json();if(!Ye.success)throw new Error(Ye.error?.message||"Failed to save credentials");b({title:"Success",description:"Credentials saved successfully"}),Z(!1),pe(""),Ge(""),await je()}catch(me){b({title:"Error",description:me?.message||"Failed to save credentials",variant:"destructive"})}finally{Re(!1)}},ft=async()=>{if(p.trim()){A(!0),S(null);try{const me=await fetch(`${Ae}/api/v1/git/branches`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:p,from:g})}).then(Ye=>Ye.json());if(!me.success)throw new Error(me.error?.message||"Failed to create branch");m(""),await je(),b({title:"Branch created",description:p})}catch(me){S(me.message),b({title:"Create failed",description:me.message,variant:"destructive"})}A(!1)}},tt=async me=>{B(me),S(null);try{const Ye=await fetch(`${Ae}/api/v1/git/branches/${encodeURIComponent(me)}/switch`,{method:"POST"}).then(at=>at.json());if(!Ye.success)throw new Error(Ye.error?.message||"Failed to switch branch");await je(),b({title:"Switched branch",description:me})}catch(Ye){S(Ye.message),b({title:"Switch failed",description:Ye.message,variant:"destructive"})}B(null)},Mt=async me=>{if(confirm(`Delete branch ${me}?`)){X(me),S(null);try{const Ye=await fetch(`${Ae}/api/v1/git/branches/${encodeURIComponent(me)}`,{method:"DELETE"}).then(at=>at.json());if(!Ye.success)throw new Error(Ye.error?.message||"Failed to delete branch");await je(),b({title:"Branch deleted",description:me})}catch(Ye){S(Ye.message),b({title:"Delete failed",description:Ye.message,variant:"destructive"})}X(null)}},Nt=async me=>{Q(me),S(null);try{const Ye=await fetch(`${Ae}/api/v1/git/branches/${encodeURIComponent(me)}/merge`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({strategy:Y})}).then(at=>at.json());if(!Ye.success)throw new Error(Ye.error?.message||"Failed to merge branch");await je(),b({title:"Branch merged",description:`${me} (${Y})`})}catch(Ye){S(Ye.message),b({title:"Merge failed",description:Ye.message,variant:"destructive"})}Q(null)},_r=async()=>{if(wt){if(et){le(!0);return}Xe(!0),S(null);try{const me=Array.from(Qe),Ye=await fetch(`${Ae}/api/v1/git/commits`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:Lt,files:me.length>0?me:void 0})}).then(at=>at.json());if(!Ye.success)throw new Error(Ye.error?.message||"Commit failed");At(""),vt(new Set),await je(),await y(),b({title:"Committed",description:Lt})}catch(me){S(me.message),b({title:"Commit failed",description:me.message,variant:"destructive"})}Xe(!1)}},Dr=async()=>{le(!1),Xe(!0),S(null);try{const me=Array.from(Qe),Ye=await fetch(`${Ae}/api/v1/git/commits`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:Lt,files:me.length>0?me:void 0})}).then(at=>at.json());if(!Ye.success)throw new Error(Ye.error?.message||"Commit failed");At(""),vt(new Set),await je(),await y(),b({title:"Committed",description:Lt})}catch(me){S(me.message),b({title:"Commit failed",description:me.message,variant:"destructive"})}Xe(!1)},Br=async()=>{if(p.trim()){le(!1),A(!0),S(null);try{const me=await fetch(`${Ae}/api/v1/git/branches`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:p,from:n?.branch})}).then(at=>at.json());if(!me.success)throw new Error(me.error?.message||"Failed to create branch");const Ye=await fetch(`${Ae}/api/v1/git/branches/${encodeURIComponent(p)}/switch`,{method:"POST"}).then(at=>at.json());if(!Ye.success)throw new Error(Ye.error?.message||"Failed to switch branch");m(""),await je(),b({title:"Branch created & switched",description:p})}catch(me){S(me.message),b({title:"Failed",description:me.message,variant:"destructive"})}A(!1)}};return r.jsxs("div",{className:"flex flex-col gap-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("h2",{className:"text-2xl font-bold",children:"Source Control"}),se&&r.jsx(it,{to:"/settings/git",className:"flex items-center gap-1.5 text-xs rounded-full px-2.5 py-1 border hover:bg-muted transition-colors",title:se.authenticated?"Authenticated with remote":"Authentication required - click to configure",children:se.authenticated?r.jsxs(r.Fragment,{children:[r.jsx(nm,{className:"h-3 w-3 text-green-600"}),r.jsx("span",{className:"text-muted-foreground",children:"Connected"})]}):r.jsxs(r.Fragment,{children:[r.jsx(ey,{className:"h-3 w-3 text-red-600"}),r.jsx("span",{className:"text-muted-foreground",children:"Not authenticated"}),r.jsx(Xl,{className:"h-3 w-3 text-muted-foreground ml-0.5"})]})})]}),r.jsxs("div",{className:"flex gap-2 items-center",children:[r.jsxs("select",{className:"text-sm border rounded-md px-3 py-2 bg-background h-9",value:O,onChange:me=>V(me.target.value),title:"Pull strategy",children:[r.jsx("option",{value:"merge",children:"Merge"}),r.jsx("option",{value:"rebase",children:"Rebase"}),r.jsx("option",{value:"ff-only",children:"FF only"})]}),r.jsxs(re,{variant:"outline",onClick:()=>Pe(),size:"sm",disabled:R==="",children:[r.jsx(jI,{className:"h-4 w-4 mr-2"+(R===""?" animate-spin":"")}),R===""?"Pulling…":"Pull"]}),r.jsxs(re,{onClick:()=>Se(),size:"sm",disabled:k==="",children:[r.jsx(h9,{className:"h-4 w-4 mr-2"+(k===""?" animate-spin":"")}),k===""?"Pushing…":"Push"]})]})]}),C&&r.jsx("div",{className:"rounded-lg border border-red-200 bg-red-50 p-3 text-sm text-red-600 dark:border-red-900 dark:bg-red-950",children:C}),r.jsxs(Ie,{className:"p-5",children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Ri,{className:"h-5 w-5 text-muted-foreground"}),r.jsx("h3",{className:"font-semibold",children:"Repository Status"})]}),r.jsx("div",{className:"flex items-center gap-2",children:r.jsxs(re,{variant:"outline",size:"sm","aria-label":"Refresh status",onClick:je,disabled:e,children:[r.jsx(ta,{className:"h-4 w-4"+(e?" animate-spin":"")}),"Refresh"]})})]}),r.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Overview of your current branch, sync status with the remote, and uncommitted changes."}),e?r.jsx("div",{className:"flex items-center justify-center py-8",children:r.jsx(ta,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):n?r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between text-sm",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-muted-foreground",children:"Branch:"}),r.jsx("span",{className:"font-mono font-semibold",children:n.branch}),et&&r.jsxs("span",{className:"flex items-center gap-1 text-xs px-2 py-1 rounded-full bg-amber-500/10 text-amber-600",children:[r.jsx(Ii,{className:"h-3 w-3"}),"Default branch"]})]}),r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsx("span",{className:"text-blue-600",children:"↓"}),r.jsxs("span",{className:"text-muted-foreground",children:[n.behind," behind"]})]}),r.jsxs("div",{className:"flex items-center gap-1 px-2 py-1 rounded"+(n.ahead>0?" bg-amber-500/10":""),children:[r.jsx("span",{className:"text-green-600",children:"↑"}),r.jsxs("span",{className:n.ahead>0?"text-amber-700 dark:text-amber-300 font-medium":"text-muted-foreground",children:[n.ahead," ",n.ahead>0?"unpushed":"ahead"]})]})]})]}),n.changes.length>0&&r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx(re,{variant:"default",size:"sm",onClick:Wn,className:"h-7 text-xs",children:Qn?"Deselect All":"Select All"}),r.jsxs("div",{className:"text-sm font-medium text-muted-foreground",children:["Uncommitted Changes (",n.changes.length,")"]})]}),r.jsx("div",{className:"rounded-lg border bg-muted/30 p-3 max-h-48 overflow-auto",children:r.jsx("ul",{className:"text-sm font-mono space-y-1",children:n.changes.map((me,Ye)=>r.jsxs("li",{className:"flex gap-2 items-center justify-between rounded px-2 py-1 hover:bg-muted/50 transition-colors",children:[r.jsxs("div",{className:"flex gap-2 items-center flex-1 min-w-0",children:[r.jsx(ds,{checked:Qe.has(me.path),onCheckedChange:at=>On(me.path,at===!0)}),r.jsx("span",{className:"inline-flex items-center justify-center w-6 h-5 rounded bg-background text-xs font-semibold",children:gt(me.status)}),r.jsx("span",{className:"text-muted-foreground truncate",children:me.path})]}),r.jsx(re,{variant:"ghost",size:"sm",onClick:()=>qs(me.path),className:"h-6 w-6 p-0 text-muted-foreground hover:text-destructive flex-shrink-0",title:"Discard changes",children:r.jsx(Tr,{className:"h-3.5 w-3.5 opacity-50"})})]},Ye))})})]}),r.jsxs("div",{className:"pt-4 border-t",children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:"Commit Changes"}),Qe.size>0&&r.jsxs("div",{className:"text-xs text-muted-foreground",children:[Qe.size," of ",n.changes.length," file",n.changes.length!==1?"s":""," selected"]})]}),(n.changes?.length??0)>0?r.jsxs(r.Fragment,{children:[Qe.size===0&&r.jsx("div",{className:"mb-3 text-xs text-amber-600 bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-900 rounded-lg p-2",children:"Select files above to commit specific changes"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(Fe,{placeholder:"Describe your changes...",value:Lt,onChange:me=>At(me.target.value),className:"flex-1 bg-background border-2 border-primary focus-visible:border-primary",onKeyDown:me=>{me.key==="Enter"&&wt&&!Ct&&_r()}}),r.jsxs(re,{onClick:_r,disabled:!wt||Ct,children:[r.jsx(hU,{className:"h-4 w-4 mr-2"}),Ct?"Committing…":"Commit"]})]})]}):r.jsx("div",{className:"text-center py-6 text-sm text-muted-foreground bg-muted/30 rounded-lg",children:"No uncommitted changes. Make some changes to your files to commit them."})]})]}):r.jsx("div",{className:"text-sm text-muted-foreground",children:"No status available"})]}),r.jsxs(Ie,{className:"p-5",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Ri,{className:"h-5 w-5 text-muted-foreground"}),r.jsx("h3",{className:"font-semibold",children:"Branches"}),r.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",a.length,")"]})]}),r.jsx(re,{variant:"ghost",size:"sm",onClick:()=>ke(!Gt),"aria-label":Gt?"Collapse branches":"Expand branches",children:Gt?r.jsx(Kl,{className:"h-4 w-4"}):r.jsx(Fn,{className:"h-4 w-4"})})]}),Gt&&r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"text-sm text-muted-foreground my-4",children:"Branches let you work on different features or fixes in isolation. Create a branch from any existing branch, switch between them, and merge them back when ready."}),r.jsxs("div",{className:"flex gap-2 mb-4 p-3 rounded-lg bg-muted/30",children:[r.jsxs("div",{className:"flex-1 flex gap-2",children:[r.jsxs("div",{className:"flex flex-col gap-1 flex-1",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"From branch"}),r.jsx("select",{className:"text-sm border rounded-md px-3 py-2 bg-background",value:g,onChange:me=>v(me.target.value),title:"Base branch for new branch",children:a.map(me=>r.jsx("option",{value:me.name,children:me.name},me.name))})]}),r.jsxs("div",{className:"flex flex-col gap-1 flex-1",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"New branch name"}),r.jsx(Fe,{placeholder:"feature/my-feature",value:p,onChange:me=>m(me.target.value),className:"bg-background border-2 border-primary focus-visible:border-primary"})]})]}),r.jsx("div",{className:"flex items-end",children:r.jsxs(re,{onClick:ft,disabled:N||!p.trim(),children:[r.jsx(Ri,{className:"h-4 w-4 mr-2"}),N?"Creating…":"Create Branch"]})})]}),a.length===0?r.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:"No branches found. Create your first branch above."}):r.jsx("div",{className:"space-y-2",children:a.map(me=>r.jsxs("div",{className:"flex items-center justify-between rounded-lg border bg-card p-3 hover:bg-muted/50 transition-colors",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[me.current?r.jsx("div",{className:"h-2.5 w-2.5 rounded-full bg-green-600 animate-pulse",title:"Current branch"}):r.jsx("div",{className:"h-2.5 w-2.5 rounded-full border-2 border-muted-foreground"}),r.jsx("div",{className:"font-mono text-sm font-medium",children:me.name}),me.current&&r.jsx("span",{className:"text-xs px-2 py-0.5 rounded-full bg-green-600/10 text-green-600 font-medium",children:"ACTIVE"})]}),r.jsx("div",{className:"flex gap-1.5",children:!me.current&&r.jsxs(r.Fragment,{children:[r.jsxs(re,{variant:"outline",size:"sm",onClick:()=>tt(me.name),disabled:H===me.name,title:"Switch to this branch",children:[r.jsx(Ri,{className:"h-3.5 w-3.5 mr-1.5"}),H===me.name?"Switching…":"Switch"]}),r.jsxs(re,{variant:"outline",size:"sm",onClick:()=>Nt(me.name),disabled:z===me.name,title:`Merge ${me.name} into ${n?.branch||"current branch"} (${Y})`,children:[r.jsx(D2,{className:"h-3.5 w-3.5 mr-1.5"}),z===me.name?"Merging…":"Merge"]}),r.jsx(re,{variant:"ghost",size:"sm",onClick:()=>Mt(me.name),disabled:P===me.name,className:"text-destructive hover:text-destructive",title:"Delete this branch",children:r.jsx(Sn,{className:"h-3.5 w-3.5"})})]})})]},me.name))}),r.jsx("div",{className:"mt-4 pt-3 border-t flex items-center justify-between",children:r.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[r.jsx(D2,{className:"h-3.5 w-3.5"}),r.jsx("span",{children:"Merge strategy:"}),r.jsxs("select",{className:"text-xs border rounded px-2 py-1 bg-background font-medium",value:Y,onChange:me=>F(me.target.value),children:[r.jsx("option",{value:"merge",children:"Merge commit"}),r.jsx("option",{value:"squash",children:"Squash & merge"}),r.jsx("option",{value:"rebase",children:"Rebase & merge"})]})]})})]})]}),r.jsxs(Ie,{className:"p-5",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Qf,{className:"h-5 w-5 text-muted-foreground"}),r.jsx("h3",{className:"font-semibold",children:"Worktrees"}),r.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",u.length,")"]})]}),r.jsx(re,{variant:"ghost",size:"sm",onClick:()=>we(!he),"aria-label":he?"Collapse worktrees":"Expand worktrees",children:he?r.jsx(Kl,{className:"h-4 w-4"}):r.jsx(Fn,{className:"h-4 w-4"})})]}),he&&r.jsxs(r.Fragment,{children:[r.jsx("p",{className:"text-sm text-muted-foreground mt-4",children:"Worktrees allow you to have multiple branches checked out simultaneously in different directories. Perfect for working on multiple features at once or testing changes without switching branches."}),r.jsxs("div",{className:"flex gap-2 mb-3 p-3 rounded-lg bg-muted/30",children:[r.jsx(Fe,{placeholder:"feature/worktree-name",value:d,onChange:me=>h(me.target.value),className:"flex-1 bg-background border-2 border-primary focus-visible:border-primary"}),r.jsxs(re,{onClick:dr,disabled:E||!d.trim(),children:[r.jsx(Qf,{className:"h-4 w-4 mr-2"}),E?"Creating…":"Create Worktree"]})]}),r.jsxs("p",{className:"mb-4 text-xs text-muted-foreground bg-muted/30 rounded-lg p-2",children:["💡 Worktrees are created in ",r.jsx("code",{className:"font-mono font-semibold",children:te})," relative to your project root.",r.jsx(it,{to:"/settings/git",className:"underline underline-offset-2 ml-1 font-medium",children:"Configure location"})]}),u.length===0?r.jsx("div",{className:"text-center py-8 text-sm text-muted-foreground",children:"No worktrees yet. Create one to work on multiple branches simultaneously."}):r.jsx("div",{className:"space-y-2 mb-4",children:u.map(me=>r.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-3 bg-card hover:bg-muted/50 transition-colors",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(Qf,{className:"h-4 w-4 text-muted-foreground"}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"font-mono text-sm font-medium",children:me.name}),r.jsxs("span",{className:"text-xs text-muted-foreground",children:["→ ",me.branch]})]}),r.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:me.path})]})]}),r.jsxs("div",{className:"flex gap-1.5",children:[r.jsxs(re,{variant:"outline",size:"sm",onClick:()=>Pe(me.name),disabled:R===me.name,title:"Pull latest changes",children:[r.jsx(I2,{className:"h-3.5 w-3.5 mr-1.5"}),R===me.name?"Pulling…":"Pull"]}),r.jsxs(re,{variant:"outline",size:"sm",onClick:()=>Se(me.name),disabled:k===me.name,title:"Push changes",children:[r.jsx(I2,{className:"h-3.5 w-3.5 mr-1.5"}),k===me.name?"Pushing…":"Push"]}),r.jsx(re,{variant:"ghost",size:"sm",onClick:()=>Ze(me.name),disabled:L===me.name,className:"text-destructive hover:text-destructive",title:"Remove worktree",children:r.jsx(Sn,{className:"h-3.5 w-3.5"})})]})]},me.name))})]})]}),r.jsx(fn,{open:G,onOpenChange:Z,children:r.jsxs(ln,{className:"max-w-2xl",children:[r.jsxs(nn,{children:[r.jsx(rn,{children:"Authentication Required"}),r.jsx(_n,{children:"Configure git credentials to push or pull from the remote repository."})]}),r.jsxs(Fm,{defaultValue:se?.remote?.startsWith("https://")?"credentials":"instructions",className:"w-full",children:[r.jsxs(Xd,{className:"grid w-full grid-cols-2",children:[r.jsxs(Yr,{value:"credentials",disabled:!se?.remote?.startsWith("https://"),children:[r.jsx(sm,{className:"h-4 w-4 mr-2"}),"Enter Credentials"]}),r.jsxs(Yr,{value:"instructions",children:[r.jsx(Xl,{className:"h-4 w-4 mr-2"}),"Setup Instructions"]})]}),r.jsxs(Kr,{value:"credentials",className:"space-y-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"auth-username",children:"Username"}),r.jsx(Fe,{id:"auth-username",placeholder:"your-username",value:ne,onChange:me=>pe(me.target.value),autoComplete:"username",className:"bg-muted border-2 border-muted-foreground/30 focus-visible:border-primary"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(be,{htmlFor:"auth-password",children:"Password / Personal Access Token"}),r.jsx(Fe,{id:"auth-password",type:"password",placeholder:"ghp_xxxxxxxxxxxx or your password",value:ye,onChange:me=>Ge(me.target.value),autoComplete:"current-password",className:"bg-muted border-2 border-muted-foreground/30 focus-visible:border-primary"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"We recommend using a Personal Access Token instead of your password."})]}),r.jsxs("div",{className:"flex gap-2 pt-2",children:[r.jsx(re,{variant:"outline",className:"flex-1",onClick:()=>{Z(!1),pe(""),Ge("")},children:"Cancel"}),r.jsx(re,{className:"flex-1",onClick:rt,disabled:Ke||!ne||!ye,children:Ke?"Saving...":"Save & Test"})]})]}),r.jsxs(Kr,{value:"instructions",className:"space-y-3",children:[r.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure one of the following authentication methods:"}),r.jsxs("div",{className:"space-y-2 text-xs",children:[r.jsxs("div",{className:"rounded bg-muted p-3",children:[r.jsx("div",{className:"font-semibold mb-1",children:"SSH Keys (Recommended)"}),r.jsx("code",{className:"text-[11px] block bg-background rounded px-2 py-1",children:'ssh-keygen -t ed25519 -C "your_email@example.com"'}),r.jsx("p",{className:"mt-1 text-muted-foreground",children:"Then add ~/.ssh/id_ed25519.pub to your GitHub/GitLab account"})]}),r.jsxs("div",{className:"rounded bg-muted p-3",children:[r.jsx("div",{className:"font-semibold mb-1",children:"Git Credential Manager"}),r.jsx("code",{className:"text-[11px] block bg-background rounded px-2 py-1",children:"brew install git-credential-manager"})]})]}),r.jsxs("div",{className:"flex gap-2 pt-2",children:[r.jsx(re,{variant:"outline",onClick:()=>Z(!1),className:"flex-1",children:"Close"}),r.jsx(re,{asChild:!0,className:"flex-1",children:r.jsx(it,{to:"/settings/git",onClick:()=>Z(!1),children:"Open Settings"})})]})]})]})]})}),r.jsx(fn,{open:He,onOpenChange:Je,children:r.jsxs(ln,{className:"max-w-md",children:[r.jsxs(nn,{children:[r.jsxs(rn,{className:"flex items-center gap-2",children:[r.jsx(Ii,{className:"h-5 w-5 text-destructive"}),"Discard Changes?"]}),r.jsxs(_n,{children:["Are you sure you want to discard changes to ",r.jsx("code",{className:"font-mono text-sm bg-muted px-1 py-0.5 rounded",children:dt}),"? This action cannot be undone."]})]}),r.jsxs(lr,{children:[r.jsx(re,{variant:"outline",onClick:()=>{Je(!1),Yt(null)},disabled:pt!==null,children:"Cancel"}),r.jsx(re,{variant:"destructive",onClick:wn,disabled:pt!==null,children:pt?"Discarding...":"Discard"})]})]})}),r.jsx(fn,{open:ce,onOpenChange:le,children:r.jsxs(ln,{className:"max-w-lg",children:[r.jsxs(nn,{children:[r.jsxs(rn,{className:"flex items-center gap-2",children:[r.jsx(Ii,{className:"h-5 w-5 text-amber-600"}),"Create a Branch First?"]}),r.jsxs(_n,{children:["You're about to commit directly to ",n?.branch,". It's best practice to create a feature branch first."]})]}),r.jsxs("div",{className:"space-y-4 py-4",children:[r.jsxs("div",{className:"rounded-lg border border-blue-200 bg-blue-50 dark:border-blue-900 dark:bg-blue-950 p-4",children:[r.jsx("h4",{className:"text-sm font-semibold mb-2 text-blue-900 dark:text-blue-100",children:"Why create a branch?"}),r.jsxs("ul",{className:"text-sm text-blue-700 dark:text-blue-200 space-y-1 list-disc list-inside",children:[r.jsxs("li",{children:["Keeps ",n?.branch," stable and deployable"]}),r.jsx("li",{children:"Makes it easier to review and test changes"}),r.jsx("li",{children:"Allows working on multiple features simultaneously"}),r.jsx("li",{children:"Simplifies collaboration with your team"})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-sm font-medium",children:"New branch name"}),r.jsx(Fe,{placeholder:"feature/my-awesome-feature",value:p,onChange:me=>m(me.target.value),onKeyDown:me=>{me.key==="Enter"&&p.trim()&&Br()},className:"bg-muted border-2 border-muted-foreground/30 focus-visible:border-primary"}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["This will create a new branch from ",n?.branch," and switch to it"]})]})]}),r.jsxs(lr,{className:"flex-col sm:flex-row gap-2",children:[r.jsxs(re,{variant:"outline",onClick:Dr,disabled:Ct,className:"sm:flex-1",children:["Commit to ",n?.branch," Anyway"]}),r.jsxs(re,{onClick:Br,disabled:!p.trim()||N,className:"sm:flex-1",children:[r.jsx(Ri,{className:"h-4 w-4 mr-2"}),N?"Creating...":"Create Branch & Switch"]})]})]})})]})}const gC=[{id:"claude",label:"Claude Code"},{id:"gemini",label:"Google Gemini"},{id:"codex",label:"OpenAI Codex"},{id:"droid",label:"Factory Droid"}],Ode=[{label:"Monday",value:"monday"},{label:"Tuesday",value:"tuesday"},{label:"Wednesday",value:"wednesday"},{label:"Thursday",value:"thursday"},{label:"Friday",value:"friday"},{label:"Saturday",value:"saturday"},{label:"Sunday",value:"sunday"}],L5=["monday","tuesday","wednesday","thursday","friday"],M5=e=>{if(!e)return"—";try{return new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(new Date(e))}catch{return e}},Wf=e=>{if(!e)return"—";const n=new Date(e).getTime()-Date.now(),s=Math.round(n/(1e3*60));if(Number.isNaN(s))return M5(e);if(Math.abs(s)<1)return"now";if(s>0){if(s<60)return`in ${s}m`;const c=Math.round(s/60);return c<24?`in ${c}h`:`in ${Math.round(c/24)}d`}const a=Math.abs(s);if(a<60)return`${a}m ago`;const o=Math.round(a/60);return o<24?`${o}h ago`:`${Math.round(o/24)}d ago`},Lde=e=>{if(e.type==="interval"){const t=e.daysOfWeek.map(n=>n.slice(0,3).toUpperCase()).join(", ");return`Every ${e.hours}h (${t||"All days"})`}return e.description||`Cron: ${e.expression}`},Mde=e=>{const t=gC.find(n=>n.id===e);return t?t.label:e},A0=e=>{switch(e){case"active":case"succeeded":return"default";case"paused":case"running":return"secondary";case"failed":return"destructive";default:return"outline"}},Bv=()=>({name:"",model:"claude",prompt:"",hours:6,daysOfWeek:new Set(L5),status:!0,anchorHour:"",agentIds:[],mcpServers:[]}),kD=e=>{if(e.schedule.type!=="interval")return Bv();const t=e.agentIds||(e.agentId?[e.agentId]:[]);return{name:e.name,model:gC.some(n=>n.id===e.model)?e.model:"claude",prompt:e.prompt,hours:e.schedule.hours,daysOfWeek:new Set(e.schedule.daysOfWeek),status:e.status==="active",anchorHour:e.schedule.anchorHour===void 0?"":String(e.schedule.anchorHour),agentIds:t,mcpServers:e.mcpServers||[]}},Fde=e=>e?Array.isArray(e)?e.filter(t=>typeof t=="string").map(t=>t.trim()).filter(Boolean):typeof e=="string"?e.split(",").map(t=>t.trim()).filter(Boolean):[]:[];function Pde(){const{toast:e}=bn(),{refresh:t}=Kp(),[n,s]=w.useState([]),[a,o]=w.useState(!0),[u,c]=w.useState(!1),[d,h]=w.useState(!1),[p,m]=w.useState(()=>Bv()),[g,v]=w.useState(!1),[C,S]=w.useState(null),[b,y]=w.useState(null),[E,_]=w.useState(null),[N,A]=w.useState(!1),[k,I]=w.useState([]),[R,M]=w.useState([]),[L,$]=w.useState(new Set),[H,B]=w.useState({open:!1,serverToRemove:null}),z=async(Z=!1)=>{try{a||c(!0);const ce=await fetch(`${Ae}/api/v1/jobs`);if(!ce.ok)throw new Error(`Failed to fetch jobs (${ce.status})`);const le=await ce.json();if(!le?.success)throw new Error(le?.error?.message||"Unknown error loading jobs");const ne=le.data??[];if(s(ne),b){const pe=ne.find(ye=>ye.id===b.id);pe&&(y(pe),pe.schedule.type!=="cron"&&m(kD(pe)))}if(E){const pe=ne.find(ye=>ye.id===E.id);pe&&_(pe)}Z&&e({title:"Schedule refreshed",description:"Latest job information loaded."})}catch(ce){console.error("Failed to load jobs:",ce),e({title:"Failed to load schedule",description:ce?.message??"Unknown error",variant:"destructive"})}finally{o(!1),c(!1)}};w.useEffect(()=>{z()},[]),w.useEffect(()=>{d&&(async()=>{try{const ce=await fetch(`${Ae}/api/v1/agents`);if(ce.ok){const ne=await ce.json(),ye=(Array.isArray(ne?.documents)?ne.documents:[]).map(Ge=>({id:Ge.filename,name:Ge?.metadata?.name||Ge.title||Ge.filename,tools:Fde(Ge?.metadata?.tools)}));if(I(ye),b){const Ke=(b.agentIds||(b.agentId?[b.agentId]:[])).filter(Re=>!ye.find(Lt=>Lt.id===Re));Ke.length>0&&(e({title:"Some agents no longer available",description:`The following agents have been removed: ${Ke.join(", ")}`,variant:"destructive"}),m(Re=>({...Re,agentIds:Re.agentIds.filter(Lt=>ye.find(At=>At.id===Lt))})))}}const le=await fetch(`${Ae}/api/v1/mcp`);if(le.ok){const ne=await le.json();if(ne?.success&&Array.isArray(ne.servers)&&(M(ne.servers),b?.mcpServers)){const pe=b.mcpServers.filter(ye=>!ne.servers.includes(ye));pe.length>0&&(e({title:"Some MCP servers are no longer available",description:`The following servers have been removed: ${pe.join(", ")}`,variant:"destructive"}),m(ye=>({...ye,mcpServers:ye.mcpServers.filter(Ge=>ne.servers.includes(Ge))})))}}}catch(ce){console.error("Failed to load agents or MCP servers:",ce)}})()},[d,b,e]);const Q=Z=>{m(ce=>({...ce,...Z}))},P=(Z,ce)=>{m(le=>{let ne;if(ce){ne=[...le.agentIds,Z];const pe=k.find(ye=>ye.id===Z);if(pe&&pe.tools.length>0){const ye=new Set([...le.mcpServers,...pe.tools]);return{...le,agentIds:ne,mcpServers:Array.from(ye).filter(Ge=>R.includes(Ge))}}}else ne=le.agentIds.filter(pe=>pe!==Z);return{...le,agentIds:ne}})},X=(Z,ce)=>{if(!ce&&k.filter(ne=>p.agentIds.includes(ne.id)&&ne.tools.includes(Z)).length>0){B({open:!0,serverToRemove:Z});return}m(le=>({...le,mcpServers:ce?[...le.mcpServers,Z]:le.mcpServers.filter(ne=>ne!==Z)}))},Y=()=>{const Z=H.serverToRemove;Z&&m(ce=>({...ce,mcpServers:ce.mcpServers.filter(le=>le!==Z)})),B({open:!1,serverToRemove:null})},F=(Z,ce)=>{m(le=>{const ne=new Set(le.daysOfWeek);return ce?ne.add(Z):ne.delete(Z),ne.size===0&&L5.forEach(pe=>ne.add(pe)),{...le,daysOfWeek:ne}})},O=()=>{m(Bv())},V=Z=>{$(ce=>{const le=new Set(ce);return le.has(Z)?le.delete(Z):le.add(Z),le})},te=Z=>{_(Z),A(!0)},U=()=>{y(null),O(),h(!0)},W=Z=>{if(Z._error){e({title:"Cannot edit corrupted job",description:"Please fix the job file manually at .nut/jobs/"+Z.id+".md",variant:"destructive"});return}if(Z.schedule.type==="cron"){e({title:"Manual edit required",description:"Cron-based jobs can be edited directly in .nut/jobs/<id>.md for now.",variant:"destructive"});return}y(Z),m(kD(Z)),h(!0)},ae=async Z=>{if(Z.preventDefault(),!p.name.trim()){e({title:"Job name required",description:"Please provide a name for the scheduled job.",variant:"destructive"});return}if(!p.prompt.trim()){e({title:"Prompt required",description:"Please provide instructions for the scheduled job.",variant:"destructive"});return}v(!0);const ce=!!b;try{const le=Number(p.anchorHour.trim()),ne=p.anchorHour.trim()===""||Number.isNaN(le)?void 0:Math.min(23,Math.max(0,le)),pe={name:p.name.trim(),prompt:p.prompt.trim(),model:p.model,status:p.status?"active":"paused",schedule:{type:"interval",hours:Math.max(1,Number(p.hours)||6),daysOfWeek:Array.from(p.daysOfWeek),anchorHour:ne},agentIds:p.agentIds.length>0?p.agentIds:void 0,mcpServers:p.mcpServers.length>0?p.mcpServers:void 0},ye=ce?`${Ae}/api/v1/jobs/${b?.id}`:`${Ae}/api/v1/jobs`,Ke=await fetch(ye,{method:ce?"PATCH":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(pe)});if(!Ke.ok){const Re=await Ke.json().catch(()=>({}));throw new Error(Re?.error?.message||`Failed to ${ce?"update":"create"} job (${Ke.status})`)}e({title:ce?"Scheduled job updated":"Scheduled job created",description:pe.name}),h(!1),y(null),O(),await z()}catch(le){console.error("Failed to submit job:",le),e({title:`Failed to ${b?"update":"create"} job`,description:le?.message??"Unknown error",variant:"destructive"})}finally{v(!1)}},se=async Z=>{if(Z._error){e({title:"Cannot run corrupted job",description:"Please fix the job file manually at .nut/jobs/"+Z.id+".md",variant:"destructive"});return}S(Z.id);try{const ce=await fetch(`${Ae}/api/v1/jobs/${Z.id}/run`,{method:"POST"});if(!ce.ok){const le=await ce.json().catch(()=>({}));throw new Error(le?.error?.message||`Failed to run job (${ce.status})`)}e({title:"Run started",description:`${Z.name} is executing.`}),await z(),await t()}catch(ce){console.error("Failed to run job:",ce),e({title:"Run failed to start",description:ce?.message??"Unknown error",variant:"destructive"})}finally{S(null)}},K=async Z=>{if(Z._error){e({title:"Cannot update corrupted job",description:"Please fix the job file manually at .nut/jobs/"+Z.id+".md",variant:"destructive"});return}S(Z.id);const ce=Z.status==="active"?"paused":"active";try{const le=await fetch(`${Ae}/api/v1/jobs/${Z.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:ce})});if(!le.ok){const ne=await le.json().catch(()=>({}));throw new Error(ne?.error?.message||`Failed to update job (${le.status})`)}e({title:ce==="active"?"Job resumed":"Job paused",description:Z.name}),await z(),await t()}catch(le){console.error("Failed to update job status:",le),e({title:"Failed to update job",description:le?.message??"Unknown error",variant:"destructive"})}finally{S(null)}},G=async Z=>{S(Z.id);try{const ce=await fetch(`${Ae}/api/v1/jobs/${Z.id}`,{method:"DELETE"});if(!ce.ok){const le=await ce.json().catch(()=>({}));throw new Error(le?.error?.message||`Failed to delete job (${ce.status})`)}e({title:"Scheduled job deleted",description:Z.name}),b?.id===Z.id&&(h(!1),y(null),O()),E?.id===Z.id&&(A(!1),_(null)),await z()}catch(ce){console.error("Failed to delete job:",ce),e({title:"Failed to delete job",description:ce?.message??"Unknown error",variant:"destructive"})}finally{S(null)}};return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[r.jsxs("div",{children:[r.jsxs("h1",{className:"text-2xl font-semibold tracking-tight flex items-center gap-2",children:[r.jsx(Zf,{className:"h-6 w-6 text-muted-foreground"}),"Schedule"]}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Automate recurring agent runs with prompts, preferred models, and guardrails."})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs(re,{variant:"outline",onClick:()=>z(!0),disabled:a||u,children:[u?r.jsx(tn,{className:"mr-2 h-4 w-4 animate-spin"}):r.jsx(ta,{className:"mr-2 h-4 w-4"}),"Refresh"]}),r.jsxs(re,{onClick:U,children:[r.jsx(mn,{className:"mr-2 h-4 w-4"}),"New Scheduled Job"]})]})]}),a?r.jsx(Ie,{children:r.jsxs(Be,{className:"flex items-center justify-center py-12 text-muted-foreground",children:[r.jsx(tn,{className:"mr-2 h-5 w-5 animate-spin"}),"Loading scheduled jobs..."]})}):n.length===0?r.jsx(Ie,{className:"border-dashed",children:r.jsxs(Be,{className:"flex flex-col items-center justify-center py-16 px-6 text-center",children:[r.jsx("div",{className:"rounded-full bg-muted p-6 mb-6",children:r.jsx(Zf,{className:"h-12 w-12 text-muted-foreground"})}),r.jsx(st,{className:"text-2xl mb-3",children:"No scheduled jobs yet"}),r.jsx("p",{className:"text-muted-foreground max-w-md mb-6",children:"Automate recurring tasks by scheduling an agent to run on your behalf. Set up your first job to get started."}),r.jsxs("div",{className:"bg-accent/50 rounded-lg p-6 max-w-lg space-y-3 text-sm text-left",children:[r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"h-6 w-6 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:r.jsx("span",{className:"text-xs font-bold text-primary",children:"1"})}),r.jsx("p",{className:"text-muted-foreground",children:"Choose the days of the week and cadence that fit your workflow"})]}),r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"h-6 w-6 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:r.jsx("span",{className:"text-xs font-bold text-primary",children:"2"})}),r.jsx("p",{className:"text-muted-foreground",children:"Provide detailed instructions so the agent can execute safely"})]}),r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"h-6 w-6 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0 mt-0.5",children:r.jsx("span",{className:"text-xs font-bold text-primary",children:"3"})}),r.jsxs("p",{className:"text-muted-foreground",children:["All runs are logged under ",r.jsx("code",{className:"text-xs",children:".nut/jobs/logs"})," for review"]})]})]}),r.jsxs(re,{onClick:U,className:"mt-8",size:"lg",children:[r.jsx(mn,{className:"mr-2 h-5 w-5"}),"Create Your First Job"]})]})}):r.jsx("div",{className:"grid gap-4",children:n.map(Z=>Z._error?r.jsx(Ie,{className:"border-destructive/50 bg-destructive/5",children:r.jsx(nt,{className:"pb-3",children:r.jsxs("div",{className:"flex items-start justify-between gap-4",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[r.jsxs(st,{className:"text-lg truncate text-destructive",children:["Unable to load job: ",Z.id]}),r.jsx(ut,{variant:"destructive",className:"text-xs shrink-0",children:"Error"})]}),r.jsx("p",{className:"text-sm text-destructive/80 mt-1",children:Z._error}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["Please review the job file at ",r.jsxs("code",{className:"text-xs bg-muted px-1 py-0.5 rounded",children:[".nut/jobs/",Z.id,".md"]})]})]}),r.jsx("div",{className:"flex items-center gap-1.5 shrink-0",children:r.jsxs(Oi,{children:[r.jsx(tc,{asChild:!0,children:r.jsx(re,{size:"sm",variant:"ghost",disabled:C===Z.id,className:"h-8 px-2 text-destructive hover:text-destructive hover:bg-destructive/10",children:r.jsx(Sn,{className:"h-3.5 w-3.5"})})}),r.jsxs(Pa,{children:[r.jsxs(Ba,{children:[r.jsx(Ha,{children:"Delete corrupted job?"}),r.jsxs($a,{children:["This will remove the corrupted job file ",r.jsx("strong",{children:Z.id}),". This action cannot be undone."]})]}),r.jsxs(Ua,{children:[r.jsx(Ga,{children:"Cancel"}),r.jsx(za,{onClick:()=>G(Z),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})]})})]})})},Z.id):r.jsxs(Ie,{className:"group relative overflow-hidden border-border hover:border-primary/50 transition-all hover:shadow-lg",children:[r.jsx(nt,{className:"pb-3",children:r.jsxs("div",{className:"flex items-start justify-between gap-4",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1.5",children:[r.jsx(st,{className:"text-lg truncate",children:Z.name}),r.jsx(ut,{variant:A0(Z.status),className:"capitalize text-xs shrink-0",children:Z.status})]}),r.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1",children:Z.description||Z.prompt||"No description provided"})]}),r.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[r.jsx(re,{size:"sm",variant:"default",onClick:()=>se(Z),disabled:C===Z.id,className:"h-8 px-3",children:C===Z.id?r.jsx(tn,{className:"h-3.5 w-3.5 animate-spin"}):r.jsxs(r.Fragment,{children:[r.jsx(Ma,{className:"mr-1.5 h-3.5 w-3.5"}),"Run"]})}),r.jsx(re,{size:"sm",variant:"outline",onClick:()=>W(Z),disabled:C===Z.id,className:"h-8 px-3 text-xs",children:"Edit"}),r.jsx(re,{size:"sm",variant:"outline",onClick:()=>K(Z),disabled:C===Z.id,className:"h-8 px-2",children:Z.status==="active"?r.jsx(B0,{className:"h-3.5 w-3.5"}):r.jsx(Ma,{className:"h-3.5 w-3.5"})}),r.jsxs(Oi,{children:[r.jsx(tc,{asChild:!0,children:r.jsx(re,{size:"sm",variant:"ghost",disabled:C===Z.id,className:"h-8 px-2 text-destructive hover:text-destructive hover:bg-destructive/10",children:r.jsx(Sn,{className:"h-3.5 w-3.5"})})}),r.jsxs(Pa,{children:[r.jsxs(Ba,{children:[r.jsx(Ha,{children:"Delete scheduled job?"}),r.jsxs($a,{children:["This will remove ",r.jsx("strong",{children:Z.name}),". Existing run logs will remain in ",r.jsx("code",{children:".nut/jobs/logs"}),"."]})]}),r.jsxs(Ua,{children:[r.jsx(Ga,{children:"Cancel"}),r.jsx(za,{onClick:()=>G(Z),className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]})]})]})]})]})}),r.jsxs(Be,{className:"space-y-3 pt-0",children:[r.jsxs("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-4 text-xs",children:[r.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-md bg-accent/30",children:[r.jsx(ty,{className:"h-4 w-4 text-muted-foreground shrink-0"}),r.jsx("div",{className:"min-w-0",children:r.jsx("div",{className:"font-semibold truncate",children:Lde(Z.schedule)})})]}),r.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-md bg-accent/30",children:[r.jsx(mr,{className:"h-4 w-4 text-muted-foreground shrink-0"}),r.jsx("div",{className:"font-semibold",children:Mde(Z.model)})]}),r.jsx("div",{className:"flex items-center gap-2 p-2 rounded-md bg-accent/30",children:r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-bold",children:"Next"}),r.jsx("div",{className:"font-semibold truncate",children:Wf(Z.metadata.nextRunAt)})]})}),r.jsx("div",{className:"flex items-center gap-2 p-2 rounded-md bg-accent/30",children:r.jsxs("div",{className:"min-w-0 flex-1",children:[r.jsx("div",{className:"text-[10px] text-muted-foreground uppercase font-bold",children:"Last"}),r.jsx("div",{className:"font-semibold truncate",children:Wf(Z.metadata.lastRunAt)})]})})]}),(Z.agentIds&&Z.agentIds.length>0||Z.agentId||Z.mcpServers&&Z.mcpServers.length>0)&&r.jsxs("div",{className:"flex flex-wrap gap-2 text-xs",children:[(Z.agentIds||(Z.agentId?[Z.agentId]:[])).map(ce=>r.jsxs("div",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800",children:[r.jsx(mr,{className:"h-3 w-3 text-blue-600 dark:text-blue-400"}),r.jsx("span",{className:"font-medium text-blue-900 dark:text-blue-100",children:ce.replace(".md","")})]},ce)),Z.mcpServers&&Z.mcpServers.length>0&&Z.mcpServers.map(ce=>r.jsxs("div",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-purple-50 dark:bg-purple-950/20 border border-purple-200 dark:border-purple-800",children:[r.jsx(Li,{className:"h-3 w-3 text-purple-600 dark:text-purple-400"}),r.jsx("span",{className:"font-medium text-purple-900 dark:text-purple-100",children:ce})]},ce))]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("h3",{className:"text-xs font-bold uppercase tracking-wider text-muted-foreground flex items-center gap-1.5",children:[r.jsx(BI,{className:"h-3 w-3"}),"Recent Runs"]}),Z.runs.length>1&&r.jsxs(re,{variant:"ghost",size:"sm",className:"h-6 px-2 text-xs",onClick:()=>te(Z),children:["View All (",Z.runs.length,")",r.jsx(Ls,{className:"ml-1 h-3 w-3"})]})]}),Z.runs.length===0?r.jsx("div",{className:"rounded-md border border-dashed bg-muted/20 p-4 text-center text-xs text-muted-foreground",children:'No runs yet • Click "Run" to execute'}):r.jsxs("div",{className:"space-y-1.5",children:[Z.runs.slice(0,1).map(ce=>{const le=L.has(ce.id);return r.jsxs("div",{className:"rounded-md border bg-card/50 overflow-hidden transition-all",children:[r.jsxs("div",{className:"p-2.5 text-xs hover:bg-accent/50 transition-colors cursor-pointer",onClick:()=>V(ce.id),children:[r.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[r.jsx(ut,{variant:A0(ce.status),className:"capitalize text-[10px] h-5",children:ce.status}),r.jsx("span",{className:"text-muted-foreground truncate",children:Wf(ce.startedAt)})]}),ce.trigger==="manual"&&r.jsx(ut,{variant:"outline",className:"text-[10px] h-5",children:"manual"})]}),ce.error&&r.jsx("p",{className:"text-destructive font-medium mt-1 line-clamp-1",children:ce.error})]}),ce.summary&&r.jsx("div",{className:"px-2.5 pb-2.5",children:r.jsxs("div",{className:"rounded bg-muted/50 p-2 font-mono text-[10px] leading-relaxed text-muted-foreground relative cursor-pointer hover:bg-muted/70 transition-colors",onClick:ne=>{ne.stopPropagation(),V(ce.id)},children:[r.jsx("div",{className:le?"":"line-clamp-2",children:ce.summary}),r.jsx("div",{className:"flex justify-center mt-1",children:r.jsx("div",{className:"text-muted-foreground p-0.5",children:le?r.jsx(Kl,{className:"h-3 w-3"}):r.jsx(Fn,{className:"h-3 w-3"})})})]})})]},ce.id)}),Z.runs.length>1&&r.jsxs(re,{variant:"ghost",size:"sm",className:"w-full h-7 text-xs",onClick:()=>te(Z),children:["+",Z.runs.length-1," more runs"]})]})]})]})]},Z.id))}),r.jsx(fn,{open:d,onOpenChange:Z=>{h(Z),Z||(y(null),O())},children:r.jsxs(ln,{className:"max-w-4xl h-[700px] overflow-hidden flex flex-col",children:[r.jsxs(nn,{className:"space-y-2 pb-4 shrink-0",children:[r.jsxs(rn,{className:"text-xl flex items-center gap-2",children:[r.jsx(Zf,{className:"h-5 w-5 text-primary"}),b?"Edit Scheduled Job":"Create New Scheduled Job"]}),r.jsx(_n,{className:"text-sm",children:b?"Update the prompt, cadence, or agent preference":"Automate recurring tasks by scheduling an agent"})]}),r.jsxs("form",{onSubmit:ae,className:"flex flex-col flex-1 min-h-0",children:[r.jsxs(Fm,{defaultValue:"basics",className:"flex-1 flex flex-col min-h-0",children:[r.jsxs(Xd,{className:"grid w-full grid-cols-3 mb-4 shrink-0",children:[r.jsx(Yr,{value:"basics",children:"Basics"}),r.jsx(Yr,{value:"schedule",children:"Schedule"}),r.jsx(Yr,{value:"advanced",children:"Advanced"})]}),r.jsxs("div",{className:"flex-1 overflow-y-auto pr-2 -mr-2 min-h-0",children:[r.jsxs(Kr,{value:"basics",className:"space-y-5 mt-0",children:[r.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2.5",children:[r.jsxs(be,{htmlFor:"job-name",className:"text-sm font-medium flex items-center gap-1.5",children:["Job Name",r.jsx("span",{className:"text-destructive",children:"*"})]}),r.jsx(Fe,{id:"job-name",placeholder:"e.g., Publish docs nightly",value:p.name,onChange:Z=>Q({name:Z.target.value}),className:"h-11",required:!0})]}),r.jsxs("div",{className:"space-y-2.5",children:[r.jsx(be,{htmlFor:"job-model",className:"text-sm font-medium",children:"AI Model"}),r.jsxs(Zt,{value:p.model,onValueChange:Z=>Q({model:Z}),children:[r.jsx(Wt,{id:"job-model",className:"h-11",children:r.jsx(Qt,{placeholder:"Select a model"})}),r.jsx(Vt,{children:gC.map(Z=>r.jsx(Le,{value:Z.id,children:Z.label},Z.id))})]})]})]}),r.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[r.jsxs("div",{className:"space-y-2.5",children:[r.jsxs(be,{className:"text-sm font-medium flex items-center gap-1.5",children:[r.jsx(mr,{className:"h-4 w-4"}),"Custom Agent",r.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"(optional)"})]}),r.jsxs(Bi,{children:[r.jsx(Ui,{asChild:!0,children:r.jsxs(re,{variant:"outline",className:"w-full h-11 justify-between font-normal",children:[p.agentIds.length===0?"No agents selected":`${p.agentIds.length} agent${p.agentIds.length!==1?"s":""} selected`,r.jsx(Fn,{className:"h-4 w-4 opacity-50"})]})}),r.jsxs(Ya,{className:"w-full min-w-[--radix-dropdown-menu-trigger-width]",children:[r.jsx(Ka,{children:"Available Agents"}),r.jsx(Xa,{}),k.length===0?r.jsx("div",{className:"px-2 py-1.5 text-sm text-muted-foreground",children:"No agents configured"}):k.map(Z=>r.jsx(No,{checked:p.agentIds.includes(Z.id),onCheckedChange:ce=>P(Z.id,ce),children:r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"font-medium",children:Z.name}),Z.tools.length>0&&r.jsxs("span",{className:"text-xs text-muted-foreground",children:["MCP: ",Z.tools.join(", ")]})]})},Z.id))]})]})]}),r.jsxs("div",{className:"space-y-2.5",children:[r.jsxs(be,{className:"text-sm font-medium flex items-center gap-1.5",children:[r.jsx(Li,{className:"h-4 w-4"}),"MCP Servers",r.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"(optional)"})]}),r.jsxs(Bi,{children:[r.jsx(Ui,{asChild:!0,children:r.jsxs(re,{variant:"outline",className:"w-full h-11 justify-between font-normal",children:[p.mcpServers.length===0?"No MCP servers selected":`${p.mcpServers.length} server${p.mcpServers.length!==1?"s":""} selected`,r.jsx(Fn,{className:"h-4 w-4 opacity-50"})]})}),r.jsxs(Ya,{className:"w-full min-w-[--radix-dropdown-menu-trigger-width]",children:[r.jsx(Ka,{children:"Available MCP Servers"}),r.jsx(Xa,{}),R.length===0?r.jsx("div",{className:"px-2 py-1.5 text-sm text-muted-foreground",children:"No MCP servers configured"}):R.map(Z=>r.jsx(No,{checked:p.mcpServers.includes(Z),onCheckedChange:ce=>X(Z,ce),children:Z},Z))]})]})]})]}),r.jsxs("div",{className:"space-y-2.5",children:[r.jsxs(be,{htmlFor:"job-prompt",className:"text-sm font-medium flex items-center gap-1.5",children:[p.agentIds.length>0?"Custom Instructions":"Instructions",r.jsx("span",{className:"text-destructive",children:"*"})]}),r.jsx(ar,{id:"job-prompt",placeholder:p.agentIds.length>0?`Additional instructions to supplement the agent's predefined behavior...
|
|
967
967
|
Example: Focus on performance optimizations`:`Example:
|
|
968
968
|
Run the following command and append the output to .nut/context/knowledge/runs.md:
|